Go to file > remux recordings. OBS has codec remuxing built-in. Alternatively, you can post the whole mkv video to YouTube just fine.
Not true. As stated above, OBS naturally has it built-in, VLC can remux mkv containers, as well as a wide variety of software designed to handle video. mkv is designed for better stability, as if some data is corrupted or lost mid-recording, the entire file isn't corrupted, as what would happen with .mp4