That said, I should probably tell you how you would go about fixing your problem: you need to find a way to make your recording, whether encoding or rendering, more efficient. You said your problem of lag occurs even when you are not recording, so it is likely that you are getting lag due to your GPU not being able to render all of the frames in the recording.
This brings up a few questions, especially since Minecraft is not a very GPU intensive game. Is your game and recording running on the integrated graphics, or the dedicated graphics card? You can do this, I believe, by first opening the Settings app, then clicking on "Graphics Settings". From here, select the "Graphics performance preference" option and set both Minecraft and OBS to run on the dedicated card. Minecraft's .exe location can be found if you right-click on the icon and click "Open File Location". Browse there and set it to "High Performance" (running on dedicated graphics). Then, do the same for OBS, which is located at C:\Program Files\obs-studio\bin\64bit\obs64.exe
Restart both programs and try again. Reply to tell me if it helped or not.