Chosen Solution
The problem is that I wanted to change the HDD for an SSD but it does not recognize it, so I tried another HDD and it does not recognize it either, they do not appear in the disk utility or anything. The only HDD that recognizes is with the one that comes from the factory and I do not know why this happens, I hope you can help me. Thanks.
You’re hitting a common problem! More often the HD SATA cable needs replacement as well. The problem is the cable tends to wear a bit rubbing on the rough surface of the aluminum uppercase and the creases of the folds. In addition the early versions of the cable had a design defect as well. Here’s the IFIXIT guide you’ll need to follow: MacBook Pro 13" Unibody Mid 2012 Hard Drive Cable Replacement and here is the replacement cable: MacBook Pro 13" Unibody (Mid 2012) Hard Drive Cable Place some electricians tape under the cable where it rests against the case to help protect it. Don’t over do the folds as you’ll weaken the foil wires inside. I also place some foam tape on the optical drive on the sides where the cable rests to help protect the cable from the case being banged which can push against the cable cutting it on the sharp edge of the optical drive. As for the version of OS, frankly I would stick with the older Sierra release as Apple still has a few issues with the newer APFS file system running on older SATA drive’d systems.