Enable Windows Game Mode. It do help.
Move the display capture to it's own separated scene because it interfere with game and window capture methods.
It's adviced to record using MKV container instead of mp4.
OBS (Open Broadcaster Software) is free and open source software for video recording and live streaming. Stream to Twitch, YouTube and many other providers or record your own videos with high quality H264 / AAC encoding.
obsproject.com
For the amount of data recorded you need to use a M.2 SDD. Any kind of SATA device is not recommended in this case.
Don't use the media source to check the video. A better option is to use VLC player.
You can try using simple output mode, testing the different quality presets. They are self explanatory.