When you use iCloud Photos, deleting a photo on one device deletes it everywhere – on that device, in iCloud, and on other devices and computers connected to the same iCloud account. So if you're trying to offload photos onto your Mac, you need to export (copy) them out of your system Photo Library to a safe place first, before you delete the synchronized copies. Otherwise … well, you discovered what happens.
That said, since you deleted the photos only a couple of days ago, they may still be available for recovery from the Recently Deleted album. See the Recover deleted photos or videos section of
Delete photos on your iPhone or iPad - Apple Support