Do deleted files take up storage space?

No, the deleted files do not count towards your storage space quota.

The deleted files can occupy up to your storage space quota of additional space. The rest is deleted regardless of the retention period. The files that are in the deleted files the longest, will be deleted first.

For example, if you own a free account, with 10 GB of storage space, your deleted files can also take up to 10 GB of space.