way more info needed.
make/model, OS, age, desktop/laptop, why was the drive changed, and anything else that can help.
I'm guessing the restart was the symptom and by ignoring (and bypassing) that, the actual cause has still been there, maybe getting worse.
did the 'black screen and restart loop' happen straight after the drive was replaced?