Question My m.2 ssd just stopped working

Jul 27, 2018
My crucial mx500 m.2 ssd just stopped working one morning and was not bootable so I did a CMOS reset and it fixed it until after boot I started getting a couple of bsods rebooting the pc on the third attempt fixed it but a few hours later during a boot up my ssd stopped working again and I can't fix it. I've tried to do a CMOS reset which did not work. Tried to mess in the csm settings but everything is normal.

My specs
R5 2600
GTX 1050ti
Asus B450f mobo
8gb tridentz RGB memory
Segate barracuda 2tb HDD

The ssd is plugged in the m.2_1 slot and I also tried removing the HDD in case it was disabling any lanes but it did not work. My ssd has a led which flickers red when it works usually but is not a solid red/orange.
The ssd works as I checked it a friend house and it booted effortlessly (He has a Asus a320m mobo).