Some remote servers are not set up with a browser. Sometimes users need to access Heroku through that using the Heroku CLI.
You can use the flag
-i with the CLI login command which will prompt you to enter your credentials on the CLI itself without using a browser.
heroku login -i
This command is documented here: https://devcenter.heroku.com/articles/heroku-cli#getting-started