Yesterday, my mom did a general cleaning on my room and when she's done, I saw the recovery phrase of my Trezor hardware wallet on the garbage can which I placed on my computer table
If it was "hidden" so insecurely that someone found it when simply cleaning, then it would easily found by any attacker. You need to find a better place to secure it where it won't be easily found.
Would it be safe if I store it online but the file is encrypted and password protected?
Nope.
A simple piece of paper? Are you serious?
I have many seed phrases which are simply written on a simple, unlaminated piece of paper. It is a perfectly acceptable solution if you have proper redundancy in your back ups.
Are USB or flash drive considered flash memory? I'm also using it as a form of backup to my other wallets.
Yes, they are flash memory. They have a limited life span and are easily damaged.
Is it safe to use those even if you connect it to your computer which is connected online?
No. It is also not safe to use them if you connect them to an offline computer which then goes back online later. They should only be used on a
permanently airgapped computer.