I never have any issues using Steam Deck to reformat my SanDisk SD card to get it ready for installing games. Did you check and test it on your computer before you inserted it into the Deck?
It is a fact that sellers on e-commerce sites mixed genuine memory cards with fake ones and shipped them out to buyers. A fake SD card will report a capacity of 256GB or 512GB on your computer, game console, or digital camera, but it contains a far smaller like 8GB or 1GB memory cell. You cannot store more than that, or your SD card becomes corrupt.
A lot of fake SD cards are made of cheap materials so they are not reliable for use at all. Any read/write operation like formatting probably will ruin it. You can try to fix the fake SD card using DiskPart to make the available memory usable.
If you have important files, use iBoysoft Data Recovery from the not working microSD card first. This SD data recovery software can deeply scan your SD card and retrieve recoverable files from your corrupted memory card.
Fix a fake MicroSD card using DiskPart:
1. Connect your SD card to your PC, open This PC and find the drive letter of the card.
2. In your Start menu search bar, input cmd and right-click on it to select Run as administrator.
3. Type diskpart in the Command Prompt and hit Enter.
4. Type list disk and hit Enter.
5. Input select disk [your drive letter].
6. Input shrink desired [number of megabytes] and hit Enter. If the fake SD card says it has 512GB capacity but its capacity is actually 8GB, you need to shrink the capacity by 504 GB. The command work in megabytes, so you need to type 504000 in the command.
After the formatting is complete, you should have the microSD card working again, but not the card with the large capacity you expected. It is better than nothing, right?