I have a 2017 13" XPS running Solus Linux. I have come to abhor this machine. I can't tell you the amount of times I've had to reboot the computer due to frozen or halting apps. I only have 8GB of RAM so that might be it but I can't run Slack app or the Google Play app at the same time without definitely causing problems.

I have a desktop with Solus and 16GB at home and never run into any issues with it.

I don't recommend this laptop anymore to anyone.

Do you have a swap partition? If you don't have a swap partition enabled, then your computer will freeze when your RAM fills up.

I have the XPS 16" and this happens to me under Arch Linux, but thankfully not very often because I have 16GB of RAM. If you really have to break out of the freeze, then you can try switching to another terminal window (eg. ctrl-alt-F3 or some other function key), then try to kill the offending process. It might take a minute for your keyboard inputs to take effect, but it generally can be done.

Tip: I have the exact same setup, and I use earlyoom (https://github.com/rfjakob/earlyoom) to prevent this. Previously, I was frequently unable to break out of the freeze no matter how long I waited, forcing a hard reboot, but with earlyoom just a single memory-heavy app gets killed instead.