I’m using an XPS 13 9350 with 16GB of RAM and the Intel Graphics 540. I am using Fedora KDE spin. When I am using computer, either randomly or when I start a program, my computer will slow down and quickly fully freeze. In this state, the only thing I can do is shut it down. Is there any way to make it so that a program is killed, or something else that doesn’t fully stop my system?
If this is a hard / full system freeze, there will be nothing you can do because the system has fully locked up. Test whether or not this is the case by pressing CapsLock and seeing if the status indicator light changes states.
Freezing like you describe is often a hardware issue, I recommend that you start by testing your RAM with Memtest86