Creating virtual host depends on the Operating System as well as which web server you are using (Nginx or Apache). Here are some references on how to create a virtual host:
Installing Laravel Valet - How to setup a local dev environment
Virtual Host on Mac OS X with Mamp (free version)
How to create Virtual Host in MAMP?
Easily Setup Virtual Host on Mac Using MAMP
How to Setup Virtual Host on Localhost / WAMP Server
How to create virtual hosts in MAMP?
How to create virtual hosts in WAMP in windows?
How to use Valet to create virtual hosts on MacOS?