The error message showing "The operation couldn't be completed" may appear when you are formatting the external drive, USB flash drive, SD card, etc in Mac's Disk Utility app. Generally, the common reason for an SD card showing the "The operation couldn't be completed" error on Mac is that it is physically locked. However, you're sure it is unlocked. Maybe the problem is your SD card reader or adapter.
Basically, you can find the physical write protection switch on all standard SD cards. The same applies to your SD card reader or adapter. To check or disable the write protection on your SD card adapter, do the following:
Step 1. Find the lock button on the SD card adapter that is inserted by your SD card.
Step 2. To disable the SD card reader write protection, slide the lock up to the unlock position.
Step 3. Connect the SD card reader to your Mac. Try to format the SD card on Mac now.
Please be noted that if you haven't backed up the important files on your SD card, back up them first before formatting to avoid data loss. If you still can't format your card in Disk Utility, check the physical connection between the SD card and the Mac. Optionally, you can run Disk Utility First Aid to repair its software issues if it has some.
If you failed to format the SD card in the end after trying the above methods, you'd better go to the SD card manufacturer for professional help since it may suffer some physical damage.