You are overloading both your CPU and GPU:
13:50:20.234: Output 'simple_file_output': Number of lagged frames due to rendering lag/stalls: 213 (3.0%)
13:50:20.234: ==== Recording Stop ================================================
13:50:20.237: Video stopped, number of skipped frames due to encoding lag: 4854/7128 (68.1%)
https://obsproject.com/wiki/General-Performance-and-Encoding-Issues
You're also both streaming and recording at a low bitrate. That's normal for streaming but not for recording. If the object is just to have a local archive at the same quality without any additional load, that's fine, but then there's no point in choosing x264 encoder settings that overload your CPU. If you haven't changed settings look at whatever else on your machine might be using resources.
Also, recording directly to mp4 is strongly discouraged. Any crashes, hangs, or other instabilities in recording will lead to an unrecoverable file; use FLV or MKV and then choose the "remux recordings" afterwards if you need to import the file into an editor that does not support those containers directly.
Lastly since you have an RX580, look at the AMF encoder plugin. It may be worthwhile for you to use hardware compression for your local recording to get better quality without increasing load.
https://obsproject.com/forum/resour...-framework-encoder-plugin-for-obs-studio.427/