real-time video encoding is VERY computationally demanding.
Just as driving blind-folded is a terrible idea, I recommend monitoring hardware resource (CPU, GPU, RAM, etc) utilization [for ex. using Task manager’s Performance tab and/or Resource Monitor] to see if your system is being maxed out with your settings.
If your system responsiveness is fine while recording, then most likely either you are recording at poor settings, or your system isn't able to keep up.
SSDs instead of HDDs overcome a lot of Disk I/O contention... but whether that is your issue or not would require you to monitor and determine for yourself.