Since you have mentioned that your SD card refused any writing actions, I suggest you check if it is write-locked first, just push the slider to another side to check if you can write files to this storage device.
Secondly, a camera has two kinds of card reformatting -- a quick level and a full level. If your photos still remained on the card after reformatting, why not give the full reformatting a try? This full reformatting is gonna take all photos and videos stored on it away.
Thirdly, insert the SD card into another camera to complete the reformatting task and see if it works out.
For the SD card reformatting work on Mac, you have to ensure that you operate with the correct steps. Read this article to reformat your SD card successfully: 3 Ways to Format an SD Card to FAT32 on Mac