Delete files from iCloud also remove them from Mac desktop, how to recover?

I erased data from my iCloud that had been uploaded from my desktop. I wanted to remove them from iCloud, not from my PC. I’m attempting all methods to get these data back, but I’m having no luck. any ideas or help?

Given that your Mac is synced with iCloud, when you delete files on iCloud.com, you also delete them from all your app devices with the same Apple ID logged in and iCloud turned on. Have you checked the Recently Deleted folder in iCloud Drive, the removed files should be there for you to restore within 30 days.

If you have already permanently deleted them, you can only rely on the Mac backup created before the deletion or third-party data recovery software to restore them unless they are not overwritten.

If you want to delete files from iCloud but keep them on Mac, you should first download those files from iCloud to Mac, after that, you can delete them in iCloud. If you don’t want to sync the Mac desktop with iCloud, you can turn off iCloud Drive for Desktop & Documents folder feature, and the previous desktop files will be kept in the iCloud Drive (Archive) within your Home folder.