Every "output format" describes the container format the video data is stored in. The compressed video frames are all the same in every container, but the format of the envelope that wraps the frames is different for every container format.
The container formats differ in usability. Some software supports this container format only, some software supports that format only. Not every compression style can be stored in every format. For example, you cannot store h.264-compressed frames in an .avi container. Some container can only store fixed-fps videos, some other container can also store variable-fps videos. There is also a difference of robustness between container formats: if you truncate a video file, the whole contents is lost for some container formats, even if the beginning seems intact.
The .mp4 format has the advantage that it is supported by the vast majority of devices and applications. It is indexed, so random access is fast. It is also able to store the current standard compression style (h.264+aac), supports multiple audio tracks and supports variable-fps video. It has the caveat that if you record a .mp4 and don't gracefully terminate the recording, for example due to a crash or disk full situation, the whole file is unusable and completely lost. This is a showstopper for important recordings that cannot be rerun.
From a technical point of view, the best format is .mkv, because it can store every combination of audio and video compression style, can do everything any other container format can, and it is robust against defects. Even if you truncate a .mkv file, the rest is still usable. It's the universal format. Unfortunately, it is not widely supported in applications and devices.
The bullet-proof workflow is to let OBS create *.mkv files and remux (convert) the file afterwards to the container format of your liking, most often .mp4. You do this with File->Remux Recordings. Remuxing only changes the container format, it does not recompress the video or audio. So quality is preserved. However, it fails, if the destination container format doesn't support the compression style that was used in the .mkv.