One of the issues you can hit is the drive you bought may not be compatible with your system. Your series has an older SATA interface standard SATA II (3.0 Gb/s) most drives sold today are SATA III (6.0 Gb/s) and are fixed speed! Think of it like a bike which only has one gear choice here 6.0 and thats it! A few drives are Auto Sense! That is like a bike with three speeds! 1.5, 3.0 and 6.0 Gb/s and that will work in your system as an example the Samsung 860 EVO is an auto sense drive. If you look at the Interface line you’ll see “SATA 6 Gbps Interface, compatible with SATA 3 Gbps & 1.5 Gbps interfaces”
So make sure you have a compatible drive before going forward
The next issue you can face is a worn or damaged SATA cable MacBook Pro 13" Unibody (Mid 2009-Mid 2010) Hard Drive Cable Make sure you don’t crease the cable as that can damage it. Here’s the guide to put it in MacBook Pro 13" Unibody Mid 2009 Hard Drive Cable Replacement and lastly a bit more on the why! Your Hard Drive Cable Is A Ticking Time Bomb
The very last issue is having a bad image and/or setup. The highest OS your system can support is OS-X El Capitan (10.11.6)
Lets give this a try download a fresh copy of the OS installer from here How to get old versions of macOS. You’ll want to setup an OS installer USB thumb drive. You’ll need a 32 GB drive and it needs to be first formatted to GUID and a journaled file system. Then follow this How to make a bootable OS X 10.11 El Capitan installer drive.
Once done you should be able to boot up under it, delete all the partitions on your internal drive (SSD) reformat it and then install the OS.