How you can recover your photos will depend on the kind of backup you made while you still had your photos.
Did you make Time Machine backups? or save a copy of your Photos Library somewhere on an external drive?
Your photos seem to have become deleted, because you have been treating iCloud Photos like an external storage. But that is not the how iCloud is working. iCloud Photos is a syncing service to keep your devices in sync. When you are deleting photos on a device, the photos will be deleted from iCloud and all other synced devices as well. The purpose of iCloud is to keep your Photos Library identical and an sync on all your devices and in iCloud - the same photos everywhere. With iCloud Photos enabled on all your devices it is not possible to have different photos on your iPhone from iCloud or your mac. You should only keep as many photos in iCloud as will fit on your device with the least storage, perhaps with "Optimize Storage" enabled. Never delete a photo yourself you want to keep - let iCloud manage the storage and remove photos from your devices when the storage is getting low - just turn on "Optimize Storage".