Hi , you can add the vs code directory to path by using the windows environment variables.
Search for Edit environment variables and open the path variable. Add vs code directory to the path folder.For example, on Windows, VS Code is installed under AppData\Local\Programs\Microsoft VS Code\bin.