How to make sure KDE has enough memory, and computer not freeze?

This isn’t opinion but factual information:

No swap, no freeze. That is what I observe on infamous host erlangen. The OOM Killer readily does what it is supposed to do.

More:

"If memory is exhaustively used up by processes, to the extent which can possibly threaten the stability of the system, then the OOM killer comes into the picture.

NOTE: It is the task of the OOM Killer to continue killing processes until enough memory is freed for the smooth functioning of the rest of the process that the Kernel is attempting to run."

BTW: Its sibling freiburg works like a charm with 64GB an no swap: Freiburg first boot Tue 2023-05-09 09:50:48 CEST