Hello! Windows 10 currently links your activation key with your windows account. So if you re install, all you have to do to get your licence is log into your windows account upon windows setup. Search "activation" in the windows search and view it in the settings page. At the top it should say specifically that it is linked to a Microsoft account.
However... If you simply transplant the old HDD into a new system with a different hardware config, it may not boot due to security stuff. Bud if transplanting does work, files may be blocked due to user access restrictions.
The best thing to do in my opinion is to wipe the HDD (or just re partition) and do a clean install of windows 10 and just use a backup and restore program to get your data back.
If its a non OS drive, a transplant should work just fine. But file access may be an issue like mentioned before, plus you'll need to go into the disk partitioner and initialize the disk and assign a drive letter.