Windows 11 allows you to record gameplay from the monitor screen on your computer or laptop with sound using the built-in Xbox Game Bar application.
Record video from a PC screen in Windows 11
Press the Win + G key combination on your keyboard to bring up the Game Bar menu, after which you can start recording.
If you do not have a recording window, then click on the webcam icon to make it appear. Alternatively, you can mute or unmute the microphone and take screenshots.
Clicking on the gear icon will open the options where you can customize the recorded gameplay.
Go to “Options”> “All games”> “Clips”, you can adjust the length of the recorded clip, frame rate, video quality and enable the recording of moments (last 30 seconds Win + Alt + G).