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
Lol. First, start cleaning up your own room! If you're old enough to be on Bitcointalk, you shouldn't need your mom to clean up after you. Second: don't leave recovery phrases laying around for anyone to find! If you want it close to your table for anyone to see, at least tape it under it so it can't easily get lost.
Would it be safe if I store it online but the file is encrypted and password protected?
Maybe. Maybe not. But are you willing to risk it? The point of using a hardware wallet is to be absolutely sure nobody can gain access to your funds. If you keep a backup online, you can never be sure.