$env:PSModulePath -split ';'
The command above will list the directories that PowerShell will search for installed modules.
There is a difference between VSCode and PowerShell ISE though!
Notethat VSCode looks in C:\Users\User\Documents\Powershell\Modules compared with C:\Users\User\Documents\WindowsPowershell\Modules