When I open two programs the system freezes

Sounds like you’re running out of RAM. Adding some swap should help.

https://wiki.archlinux.org/title/Swap

3 Likes