It is prudent in Macbook Pros of that year to change the hard drive CABLE at the same time as the drive. The cable is routed across some sharpish edges on the metaal chassis and, with the normal vibration of use and transport, can have its thin insulation chafed off. That can cause shorts that mimic everything from a bad hard drive to a bad logic board. This is more common in the 13-inch models, but then the 13s outnumber the 15s by a wide margin. Still, from an abundance of caution, had I a 15-inch 2012 Macbook Pro needing an SSD I would change the cable anyway.
The cables are relatively cheap (don't pay more than about US$20) and easy to change. I got mine form OWC when I bought an SSD for my 13-inch 2012. They are also on Amazon but some are badly overpriced. Here is what the cable looks like:
https://eshop.macsales.com/item/Apple/9230084/
I also strongly approve of the MX500 but it was not available when I upgraded my Macbook Pro, so I went with the OWC. The only issue I find with the OWC is that the company says it is not necessary to enable TRIMforce on their drives.
I found that, lacking TRIM, my drive's write speed plummeted from a nominal 500MB/sec to as low as 60MB/sec on mine after about three years of use. The speed returned when I engaged TRIM and did numerous safe boots to get all the "housework" done.