Hello,
The error you are seeing after replacing the hard drive is tied to how Microsoft activation binds a product key to hardware. When you install Windows and activate with a retail or OEM key, the activation service generates a hardware ID based on components such as motherboard, CPU, and storage. If you change major hardware, especially the motherboard, the activation service may treat the system as a new device. In your case, the system is reporting that the key is already in use because the activation servers still associate it with the old hardware ID.
If the key is retail (purchased standalone), you can transfer it to new hardware, but you must re‑activate it. Normally, this is done through the “Activation Troubleshooter” in Settings > System > Activation. Select “I changed hardware on this device recently” and sign in with the Microsoft account that was linked to the license. This re‑binds the key to the new hardware. If the key was never linked to a Microsoft account, you will need to contact Microsoft Support directly to have them reset the activation record.
If the key is OEM (preinstalled by the laptop vendor), it is non‑transferable. OEM keys are locked to the original motherboard and cannot be reused after replacement. In that case, the only resolution is to obtain a new license.
In short, if your key is retail, use the Activation Troubleshooter or contact Microsoft to reset the binding. If it is OEM, it cannot be reset and you will need a new license.
I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer. Should you have more questions, feel free to leave a message. Have a nice day!
Domic Vo.