Hello Ray Pooley,
Thanks for your question! You understand that websites are bound to an IP address and port given their hostname.
By default, IIS sets up a default site running on port 80. As a result, you may get errors or warnings when trying to map other sites to this port because port 80 is currently in use and IIS would need to be restarted to realize the changes.
Please try stopping the default IIS website. You may even remove it completely. Then you should be able to add the entries as you desire using the command line or GUI.
Please reference https://woshub.com/run-multiple-websites-on-the-same-port-and-ip-address-on-iis/ for more information and a more hands-on walkthru complete with command line and PowerShell commands. Please let me know if there is anything else I can help you with!
I seem to have overlooked your main question. IIS views the HTTP request header for this information. Please refer to https://developer.mozilla.org/en-US/docs/web/http/headers#request_context for more information on HTTP headers, specifically the host.