first, you need to check the Recently Deleted folder in iCloud Drive, if the file is there, click Recover.

also there is a data recovery tool in iCloud Drive, it will list the recoverable files for you to restore.

And according to iCloud users, files that are permanently deleted from iCloud in the past 30 days, can be retrieved with the assistance from Apple Support, find the numbers for your location and call an advisor for help: Contact - Official Apple Support
In addition, if the iCloud Drive files are uploaded from your Mac, even though you trashed the copies, it is possible to recover the copies on your local disk, via dmde or cisdem.