VS Code does not come with the native PowerShell support. It must be added. Once VS Code is installed, open it, and select the EXTENSIONS button on the left-hand side.
Type PowerShell in the search dialog box, and install the PowerShell language support:
After installation, the extension provides Syntax highlighting, testing using PowerShell Script Analyzer, debugging, and so on.