When I open two programs the system freezes

Im not sure I follow, or you follow, or what even a path is.
:face_with_spiral_eyes:

But just in case … modifying the swappiness setting does not create SWAP.

For those settings to have any effect you will need SWAP configured and enabled.

If you need an example - here is one for creating an 8gb swapfile: