RAM is not the only factor. Problems I had with shared hosting included (not limited to)
- limited number of processes killed my site
- slow (or overloaded) CPU
- email ports not open or cron jobs not allowed
- if cron jobs are allowed (and someone else on your server mis-configures them) or there are spammers on your shared hosting space, you have a good chance of slowness, no matter how much RAM you have on paper
Shared hosting is often overbooked. Many people buy cheap hosting and never use it. The providers calculate with that and many overbook their servers.
Also, you should check the TOS of your shared hosting provider. They typically limit how much % of the time you're allowed to use 100% of the allocated resources.
If you get a barebone VPS (managed is more expensive, but someone else maintains your VPS) you will have to learn a lot of stuff to get it secure and running smoothly. Barebone VPS offers no support (other than that the server is running.)
You'll have to die one death.
I cried when I had my first VPS and was on SSH level for the first time. Now I'm a gifted cut&paste "technican"