Sorry for the late reply.
Yes, 5GB is the available space of my macintosh HD. Only the Photoshop and FCP ran slowly yesterday. But today, everything is slow and I can't even use the computer at all.
I guess the hard drive or OS is problematic?
So what should i do? Should I downgrade to macOS Mojave? Or reinstall macOS Catalina?
This is a pretty dire situation, I'm sorry to say.
To be clear - no offence intended -
Memory is also known as Working Memory, RAM, PRAM and is in the range of 4 to 32GB; 8GB being generally accepted as the minimum for good operational use with macOS Catalina. What is yours? You said 5GB, but maybe you are confusing this with the storage space left???
Storage is the amount of space on the Hard Drive for storing the OS, and everything else and can be from 128GB up to 4TB on the latest iMacs.
What you appear to be telling us is that you only have 5GB of STORAGE space left - out of what, BTW? And given the confusion, what RAM do you have?
And now the DON'TS: Do not attempt to downgrade to macOS Mojave or reinstall macOS Catalina.
What to DO: Move at least 100GB from your Hard Drive to an EHD. In fact, the more storage space you can move out the better. Think of things like Photo libraries, Music libraries, large Documents etc.
And another crucial thing is Backups. Do you have Time Machine or a cloned Backup (BU)?
The situation you are in could potentially lead to loss of all your data. Obviously we all want to avoid that.
So: top priority, move out at least 100GB of data to an External Hard Drive (EHD) - more than that if possible.
Backup your iMac.
Ian