You should record to FLV because it's a safer file format. YouTube will accept FLVs for upload directly, but you can use OBS Studio to remux your FLVs to MP4s if you prefer (File > Remux Recordings). If you need MP4 files for editing software, you can also use remux for that.