G++ is not recognized

I only needed to add it to the user section of the environment variables. Changes to environment variables will also require any open terminals and/or VSCode to be restarted. It may even be necessary to restart the computer, if the WM_SETTINGCHANGE message that is broadcast when environment variables are updated is not being handled.

What happened to the other entries in your System path? There are usually a lot of entries by default, including your Windows and Windows/System32 directories.

To see if the path has updated, or is correct, in the powershell window, try running $env:path, and see if C:\MinGW\bin is in the list.