When installing Flask, you might want to create a unique environment for each project. To do this, you need to use a virtual environment.
On Visual Studio Code, type in the following in your Python shell, where env is the name of your virtual environment:
env\Scripts\Activate.ps1

To correct the error above, type the code below into your PowerShell window:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

As you can see from the above image, the virtual environment has now been created.
You can now install Flask.