In Visual Studio Code, you can easily and quickly set up a local live server by installing the Live Server extension by Ritwick Dey.
Video tutorial:
Go to the VS Code Marketplace tab (Mac shortcut: CMD + Shift + X), search for Live Server, and click install.
In a few seconds, you’ll have a button called “Go Live” in your bottom menu bar:
Click on it to launch your local live server.
Click on it again to shut it down.