I used OBS, and everything was okay, but after I reinstalled the system and switched from XFCE to KDE Plasma, I encountered an error. I have no idea what changed, except for the desktop environment, and I don't know why I am facing these problems now. OBS freezes my PC and closes every game (I guess?).
[h264_nvenc @ 0x560bc40b0b80] Using global_quality with nvenc is deprecated. Use qp instead.
Honestly I'd recommend going to ~/.config/obs-studio and making a backup of your scenes then deleting the originals. Start up OBS and set things up again.
I've had similar issues when switching between KDE Plasma and sway, if I left the old scenes there OBS would break after switching enviornments. Once I deleted the scenes it would work fine.