WD Black keeps failing in many ways (Cant read or write)

So a while back I bought this. https://www.amazon.com/Black-500GB-High-Performance-NVMe-WDS500G2X0C/dp/B07BR9FV1C/ref=dp_ob_title_ce It started by showing up in the western digital software but I wasnt able to put anything on it. I made a new storage space which made me able to put things on it, but it no longer showed up in the software. A few days later, it simply disappeared from all system menus. I removed it, powered on and off the computer, and put it back in. It worked and remained that way for a while. Now however, it simply disappeared again, showing an error on the standard NVM Express controller. I messed around with the bios but didnt change anything. However, when the computer turned back on, the drive was back, sort of. You can view the stuff on it, but you cant edit or use anything. Anyone have an idea whats going on?