If you want to add it permanently:
Add this to your ~/.bash_profile, or to ~/.zshrc if you are running macOS v10.15 (Catalina) or later.
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
Source: https://code.visualstudio.com/docs/setup/mac
1. Make sure you drag Visual Studio Code app into the -Applications- folder
2. Next, open Visual Studio Code
Open the Command Palette via (⇧⌘P) and type shell command to find the Shell Command:
> Install 'code' command in PATH** command.