It's hard to know exactly what happened, but it sounds like you had both phones synchronized with iCloud, and synchronize means "keep exactly the same." So when you tell one phone to delete pictures, they are deleted on all devices connected to that account. The only way to avoid that is to disconnect from the iCloud account.
Because of accidents like these, we keep backups of our pictures. To back up your pictures you can just plug in an external drive, select the pictures, and use Share>Save to Files. Alternatively, you can backup to a computer:
Transfer photos and videos from your iPhone or iPad to your Mac or PC
If you haven't done one of those backups, then your remaining pictures continue to be in peril.
You can try contacting Apple
Connect with live support
but they likely will tell you that you need to rely on your backups.