What should I input the connection name there? I have a database called Stack Overflow... I tried the hostname as localhost and it didn't work
It doesn't matter what you put as the connection name. This is just the name the SQL Developer uses to list the database (so using the database name is a good idea but it can be anything you want).
The problem here is that SQLEXPRESS isn't a known hostname. The hostname should be the name (or IP address) of the server that hosts the SQL Server instance which holds your database. Once you have the correct hostname and port you should be able to select the database you want from the drop-down list. Click Test to ensure all is OK, then Save.