If nothing happens when you press the Windows logo key + G, check your Game bar settings. Open the Xbox app, and select Settings > Game DVR and make sure Record game clips and screenshots using Game bar is On.
If Game bar doesn’t appear for a full-screen game, try keyboard shortcuts: Press the Windows logo key + Alt + R to start recording a clip, then press it again to stop. You’ll see the screen flash when the recording starts and ends.
If the Windows logo key isn’t working during a game, the game may be blocking it. To create your own keyboard shortcuts for Game bar, choose the Xbox app, then select Settings > Game DVR > Keyboard shortcuts and set your own.