Sorry, but they will be gone then. iCloud does not archive photos - it simply syncs content, and changes, across devices. If both devices were connected to iCloud when you deleted from one, those deletions were sync’d across the other. Did you ever transfer those photos to your computer for backup and safe keeping?
See https://support.apple.com/en-us/HT204264
”Here's how it works
iCloud Photos automatically keeps every photo and video you take in iCloud, so you can access your library from any device, anytime you want. Any changes you make to your collection on one device, change on your other devices too. Your photos and videos stay organized into Moments, Collections, and Years. And all of your Memories and People are updated everywhere. That way you can quickly find the moment, family member, or friend you're looking for.”
and
”Back up your photos and videos
When you turn on iCloud Photos, your photos and videos automatically upload to iCloud. They're not duplicated in your iCloud backup, so you should keep backup copies of your library. You can download your photos and videos from iCloud.com to your computer and store them as a separate library, transfer them to another computer with Image Capture or Photos, or store them on a separate drive.
If you're on a device with iOS 11 or later or macOS High Sierra or later, the photos and videos you take are in HEIF and HEVC format. These formats use less storage, with the same quality.”