For future reference. Protect your images from the get go.
I have a set routine. When it comes time to download images from camera to computer, I lock the SD card, then connect just the card to the computer. That way there is zero chance of something being edited or deleted as I download. Remove card from computer and unlock and replace in camera.
Next step is to back-up the images to a secondary drive, I do that before I open a one of them.
Once I have quickly gone through the images and deleted the duds, I will do a second back-up do a different drive. After that it is safe to open images in an editing program.
If the card is close to full I can now safely reformat it in the camera. Otherwise the photos stay there.
This works well with a regular camera, but if you are shooting and editing on an iPhone things can get a lot dicier. But the essential back-up precautions are even more important.