Deleting a file or folder doesn't destroy it immediately — it moves to Trash, where it stays for a retention window (30 days) before it's permanently removed.
During that window you can restore an item if it was deleted by mistake. After the retention period, trashed items are purged for good and can't be recovered, which also frees up the storage they were using. If you need to reclaim space sooner, you can permanently delete items from Trash yourself.