Assuming you had Windows 10 installed on a PC an easy easy way to get Windows 10 back on the PC, after you have an issue with the PC, or that you say replaced the hard drive is to reinstall Windows 10 with a USB drive that you used the Microsoft Media Creation Tool to place Windows 10 on. Very easy, you place the USB stick in the USB port on the PC and you turn the PC on. Windows, in minutes is installed on the PC. When finished you just log in on the newly installed Windows 10 and Microsoft's servers, automatically register the Windows 10 operating system. You do not enter a registration key. This process is very simple. SO, if you keep on hand a USB with the ISO Windows 10 on it and then you back up all your personal files and software to say a portable hard drive then when the day comes and you have issues you will be all set.
Yes, some will say to create a Windows Recovery USB stick or mirror your hard drive and such but reality is an easy and fail save way that always provides positive results is to do as I mentioned and create an ISO Windows 10 USB stick. You can get the Microsoft Media Creation Tool
here. Just remember to always have a current backup of your programs and personals files. Best bet is to keep this backup off site, in case you have fire, theft, etc..