I would return it, but if you are curious you can try some of the following to get experiencing identifying bad disks.
You could try a different computer or controller to be sure.
If you can get some writes/reads to work, you can use badblocks or dm-crypt: https://wiki.archlinux.org/title/Badblocks#Alternatives
Badblocks will write known data to disk then read it to verify its good. If the disk is malicious, this can be faked. badblocks is also a little slow.
Using dm-crypt in the wiki will write zeros through dm-crypt which will result in random noise being written to disk, then compare with zeros to verify reads are good. This can not be faked easily since the zero stream is encrypted as it is written to disk.
A ton of people using github barely understand the different between github and git and often think they are the same thing or that github and git are somewhat related more than they really are.