When you fail to restore your files from iCloud Drive, your files might be deleted permanently and you can use third-party software to recover them as soon as possible.
I recommend you to use iBoysoft Data Recovery for Mac. It's powerful tool with high recovery rate, risk-free environment, etc. and you can use it to recover your deleted files effortlessly. It can help you recover various types of files like photos, videos, documents, etc. Except that, it is fully compatible with the latest macOS Sonoma.
Step 1: Free download, install, and launch iBoysoft Data Recovery for Mac.
Step 2: Choose the volume or drive where you store your files.
Step 3: Click Search for Lost Data.
Step 4: Preview the searching result and then click Recover.