MKV
It's normally not heard of in the consumer world, but it works more like an analog tape in that if something goes wrong, you still have everything up to that point.
The well-known MP4 is designed to make playback plumb easy on minimal devices, so some of its important parts can't be finalized until the recording itself is finished. So if something goes wrong there, you lose *everything*!
Any editor worth its salt, and most upload destinations (including YouTube), will take MKV directly, with no need to convert. But if you really MUST have MP4, OBS can remux the MKV recording to an MP4 file, after the fact. It's the exact same data in a different container, so there's no loss of quality, and it's fast, limited only by the speed of the storage medium.