Not 100% sure on what you mean.
You broke your old HDD and replaced it with a new one, was the GTA V Installation on that HDD? If so, then you'd need to reinstall GTA V, log back into your account and then you can play GTA V Online.
That is what I'm guessing you meant, if not then correct me