One thing is the RAM memory and a different thing is the hard disk.
The RAM (random access memory) is used by the operating systems to store the processes of all applications, kernel..., and it's erased when you turn off the Mac. The hard disk is a part where you store all of your personal files, your applications and the operating system; the hard disk isn't erased unless you want to do that, and with its use, it may fail, so you should make backups of your files.
In your case, you may need a bigger hard disk for your Mac if you haven't got enough storage to store all your data