According to your description, there's a big chance your microSD card has some hardware issues that cause it unable to format on both Windows and Mac devices. Your last hope is to initialize the memory card and try reformatting it again.
Scenario 1. The microSD card is physically damaged.
Take a close look at your SD card, do you find any missing components or fragile spots? The SD card is not a durable storage device and can easily get broken. If your microSD card has severe hardware issues, you can consider buying a new one.
Scenario 2. Fix the SD card won't format issue by initializing it with diskpart command.
In addition to formatting the SD card by right-clicking on it, have you tried formatting it using CMD? You can use the diskpart command to initialize the card. Hopefully, you can reformat the SD card this time.
Step 1. Connect your microSD card to your Windows PC via an SD card reader.
Step 2. In the Windows search bar, type in command prompt and hit the Run as administrator option.
Step 3. Type in diskpart and press Enter.
Step 4. Execute the following command.
list disk
Step 5. You should see all detected drives on your computer. Type in the following command and hit Enter. Make sure to replace X with the corresponding number of your SD card.
select disk X
Step 6. Execute the following command.
clean
Step 7. Next, input the following command to create a partition on the clean SD card.
create partition primary
Step 8. Type in the following commands to assign a file format to your SD card.
format fs=exfat
Step 9. Assign a letter to this drive and hit Enter. For example:
assign letter=F
Now your SD card is successfully formatted with the exFAT file system.