Whenever you delete a file, you just remove the entry instead of the file itself. First, the space of this deleted file will be marked as "available" for writing new data. But once new data occupies the marked area for "available", it's getting hard for any piece of software on the market to retrieve replaced and overwritten files. You may check out this one at: https://www.bestbackups.com/minitool-mac-data-recovery-review/
If you empty the Trash the files are gone. If a program does an immediate deletion rather than moving files to the Trash, then the files are gone. Data recovery is possible but there is no 100% guaranty it will recover all your data. You can try to recover deleted files from trash on mac by using this tool - https://www.cleverfiles.com/mac-trash-recovery.html . Hope it helps!