Most likely, your CPU can't keep up.
As of OBS 19.0.0, an Auto-Configuration Wizard was added to help new or inexperienced users select streaming and recording settings that their PC can handle. It can be accessed from the Tools menu in OBS, and then just follow the on-screen directions. You can use this tool to get a set baseline settings for your hardware.
If that doesn't help enough, please post a log.
To make a clean log file, first restart OBS, then start your stream/recording for ~30 seconds and stop it again. Make sure you replicate any issues as best you can, which means having any games/apps open and captured, etc. When you're done select Help > Log Files > Upload Current Log File. Copy the URL and paste it here.