Hi
If you have iCloud backup turned on before problems then when you charge an iphone it should be automatically backed up to iCloud Over your wifi
Go to settings down to reset Restore iPhone back to factory settings.
Set back up over your wifi when it asks if you want to use iCloud backup Say yes
Choose a backup from when you had all your photos.
This will only work if you had iCloud backup turned on before problems.
Cheers
Brian 🇬-1F1E7;