When you delete a file in Nextcloud, it is not
immediately deleted permanently. Instead, it is moved into the trash bin. It is not permanently deleted until you manually delete it, or when the Deleted Files app deletes it to make room for new files.
To configure, how items are permanently deleted, configure the
trashbin_retention_obligation parameter.
The parameter can be edited using the File Manager and editing the file
config/config.php.
Info: In the recent versions of the Nextcloud package, the default retention is set to a min of 7 days and a max of 30 days.