Macbook Pro 15inch mid 2010 won't detect internal hard drive
i've experienced the same issue last year. I was instructed to reinstall macOS. And it worked.
You can download the Yosemite &amp; El Capitan bootable installer here:
https://support.apple.com/en-us/HT210717
https://support.apple.com/en-au/HT206886
And create bootable USB: https://support.apple.com/en-us/HT201372
OR through Internet Recovery Mode: https://support.apple.com/en-us/HT201314.
Apple have something called EFI: https://en.wikipedia.org/wiki/EFI_system_partition
which in your case, i think it might have corrupted. Reinstall macOS would do the trick. You should open your mac and take the 'old SSD' out before reinstall with a new one.
Good luck :)