1. Enable Game Mode via the Windows 10 "Settings" app, under Gaming > Game Mode.
2. Your audio devices has a sample rate that doesn't match the OBS sample rate. This can result in audio drift over time or sound distortion. Check your audio devices in Windows settings (both Playback and Recording) and ensure the Default Format (under Advanced) is consistent. 48000 Hz is recommended.
OBS Sample Rate: 48000 Hz
Speaker/Headphone (Realtek(R) Audio): 192000 Hz
3. Run OBS as admin. Right click on shortcut, properties, advanced, check box, ok, apply, ok.
4. Use the QuickSync Video (QSV) encoder if available.
5. Record to MKV. If you record to MP4 or MOV and the recording is interrupted, the file will be corrupted and unrecoverable.
If you require MP4 files for some other purpose like editing, remux them afterwards by selecting File > Remux Recordings in the main OBS Studio window or enable Auto Remux in the Advanced Settings.
6. Change the resolution on your capture device to 1280x720 and set the FPS to 30. Try a different output format besides MJPEG.
If still having issues after making those changes, post new recording log.