First, open Windows Settings. To do so, open the Start menu and click the small “gear” icon, or press Windows+i on your keyboard.

In Settings, click “Gaming.”

In Windows Settings, click "Gaming."

Under “Xbox Game Bar” settings, click the switch beneath “Enable Xbox Game Bar” until it is turned off. That will disable the Xbox Game Bar.

Click the "Enable Xbox Game Bar" switch.

After that, close settings. Try pressing Windows+G, and nothing will pop up.