Thank you going to try that.Don't record directly to .mp4. There are several issues doing that, the most severe being the file not being readable if anything happens during recording, since it has to be closed with necessary metadata about the file at the very end (which could be where things are failing on your end).
Record to .mkv. If you need .mp4 for further editing, just use the Remux tool in OBS -- it's very fast, and you can delete the .mkv once the .mp4 is created.
I need to record with 240FPS for editing and my PC can handle it. It is just the mp4 problem.And record at 60fps, not 240.