For Mac OS catalina 10.15.5 open system preferences > click on Apple ID icon > again click on iCloud > click on manage , select photos and click on turn off and delete .
and you click on delete the photos are deleted but can be brought back , an immediate mail will be received in IMAP account , click on the link and revert it .
iCloud Photos has been disabled on all your devices and new photos and videos are no longer uploading to iCloud.
There are currently 54 photos and 0 videos in your iCloud Photos
Original format, full resolution versions of your photos and videos are not stored on your devices. You must download your full resolution photos and videos to at least one device before they are deleted from iCloud Photos in 30 days.
To download your photos and videos to an iPhone, iPad or iPod touch with iOS 8 or later:
1. Connect to a power source and Wi-Fi.
2. Go to settings, tap on your account, tap iCloud, and then select Photos.
3. Tap Download and Keep Originals.
If your library exceeds the storage space available on your device, you can download your photos and videos to your Mac or PC from iCloud.com.
If you do not want iCloud Photos turned off, you can turn it right back on your iOS device:
1. Go to Settings and tap iCloud.
2. Select Storage and tap Manage Storage.
3. Select iCloud Photos and Undo Delete.
You can increase the iCloud storage space by purchasing a new plan https://support.apple.com/en-us/HT201318
When sufficient space is created , you can download the photos from iCloud.com https://support.apple.com/en-in/HT209454
And you have not deleted any photo from the device .