You should still be able to retrieve the lost photos from the formatted SD card using a reliable data recovery application on your computer.
To increase the chance of restoring the photos, you should immediately stop saving any new files to the SD card and start data recovery with a tool like iBoysoft Data Recovery for Mac right away.
According to users who have experience with this software, it's a great Data Recovery tool that excels in restoring lost files including photos, videos, audio, documents, and so on from accidentally formatted SD cards, USB flash drives, hard drives, and other commonly-used storage devices.
Besides, it also has lots of positive feedback on its intuitive interface. Don't hesitate to give it a try, as you can preview the files for free to see whether it can truly recover the lost files.
Follow these steps to recover files from the formatted SD card:
Step 1: Insert the SD card into your computer.
Step 2: Free download and install iBoysoft Data Recovery to your computer.
Step 3: Launch the software, select your drive, and start scanning.
On Windows: Click Data Recovery, select your SD card, then click Next.
On macOS: Select your SD card and click "Search for Lost Data."
Step 4: Preview files found from the formatted SD card.
Step 5: Tick the checkboxes next to the files you want to restore, then tap the Recover button and save them to another storage device.