VPS / VDS is significantly different from the usual virtual hosting. VPS / VDS is a virtual server that can be configured in any way.
Any tasks that you can solve on your personal computer can be solved by VPS / VDS. This is completely your server, and you can configure it exactly for your tasks.
But VPS / VDS is limited in resources, and has a clear limit of capabilities. The main resource in which there is a shortage is RAM.
To process each action, some amount of RAM is allocated. With increased load, it may be short and the server will "hang".
It should also be noted that the RAM is consumed not only by user processes, but also to maintain the operating system as such.
On a virtual hosting, as a rule, no one limits the RAM consumed by your scripts, as well as the processor loads from your scripts and databases.
But you are limited in the ability to configure the server, and the owner at any time can block you for the load.
On VPS / VDS there are strict limitations on resources, but there are no other restrictions. You can configure the server in any way.