Hi,
As the machine originally shipped with Windows 8, I'll assume you did the free upgrade to Windows 10 - if that's correct and as long as the previous installation of Windows 10 had activated Ok after the upgrade, you can just perform a clean installation of Windows 10 on your new HDD by creating your own installation media as detailed in the guide on the following link.
Note: At the activation screen, select 'I don't have a Product key' - Windows will activate automatically once the installation has completed.
http://www.howtogeek.com/224342/how-to-clean-install-windows-10/
Regards,
DP-K
---------------------------------------------------------------------------
****Click the White thumb to say thanks****
****Please mark Accept As Solution if it solves your problem****
****I don't work for HP****

Windows Insider MVP