APFS Format on a Samsung T5 SSD

It is a pain when something like that happens. The easiest way may be getting a replacement.

Something different to try would be to do something crazy:

When I changed my NAS from QNAP to Synology, I had difficulties to wipe the hard drives and to get them recognized in the Synology NAS. Neither my Mac nor the Synology NAS recognized the hard drives correctly.

I attached the hard drives to a PC and used the Windows disk management tool to wipe the disks including their file system.

It worked like a charm. If you have access to a PC, it might be worth a try to delete everything (including partitions) from the SSD including the file system.