You may retrieve your photos if you can stop saving files to the memory card and start repairing your photo library asap.
Before using the Photos Repair Library tool, ensure you have backed up the library. You can use Time Machine, a third-party backup solution, or simply copy the library folder to an external drive. You can access your photo library by launching Finder, clicking Go > Go to Folder, and entering ~/Pictures.
Then follow these steps to repair the photo library:
- Choose Photos > Quit Photos from the top menu bar if it's open.
- Press Option + Command while double-clicking the Photos app icon.
- When a window opens, click Repair to recreate your photo library.
If that doesn't get back your files, you recover the deleted files from your memory card using iBoysoft Data Recovery for Mac. It's a professional data recovery tool that can retrieve lost or deleted photos, videos, audio, documents, etc from all kinds of storage devices like memory cards, USB sticks, hard drives, and so on.
You can use it to scan your memory and preview the deleted photos for free. There's good chance to restore them if they are not overwritten by new files.
Here's how to recover the deleted photos on your memory card:
Step 1: Keep the memory card connected to your Mac.
Step 2: Free download and install iBoysoft Data Recovery on your Mac.
Step 3: Launch the memory card recovery software, select your card from the list of mounted devices, and click "Search for Lost Data."
Step 4: Preview the found files.
Step 5: Tick the boxes next to the files you want to restore, then click Recover and choose a storage location for them. Remember not to save the recoverable files to your memory card to avoid overwriting and corruption.