Greetings .
When a user executes a process that demands a lot of resources, the entire VPS crashes, is there a way to limit the resources of the users? Memory, for example, that does not take up all of the server's memory.
Generally, that is the point of "Packages" -- setting resource limits for users, but mostly in the sense of disk space, mail & FTP accounts, DBs. If you are running PHP-FPM (or any PHP version, really) -- each PHP version can have a memory limit. Also look into cgroups:
https://www.youtube.com/watch?v=ocgRqy9whtg (https://www.youtube.com/watch?v=ocgRqy9whtg)