HDD not recognized by MacBook
A brief answer - more educated guess than absolute certainty...

The prime suspect would be a failing SATA cable - starting to go intermittent [which of course makes diagnosis harder] - but cheap enough to just replace &amp; see.
It is a relatively common issue.