If it gives you a password prompt you’ll want to enter your credentials so the hosts file can be updated. These would be your desktop credentials and not Local ones or the ones for your site.
If you’re not getting a password prompt (are you on Windows?) you might need to manually grant some permissions. You could start here: