There are two ways.
1> Activate Automatically remux to MP4 setting
Step 1. Open OBS and tap on File. Find the Settings and head to Advanced in the pop-up Settings window.
Step 2. Move to the Recording section and check the “Automatically remux to MP4” box.
Step 3. Hit OK to save the changes, and the auto MKV to MP4 is activated now!
2> Manually remux OBS MKV to MP4
Step 1. Run OBS and click File on the top menu bar, then select the Remux Recordings option.
Step 2. Add the MKV recording to the interface by clicking the three-dotted button under the OBS Recording section.
Step 3. Click the three-dotted button under the Target File to select an output path and rename the recording.
Step 4. Press Remux to start the process.