This has been mentioned on this site at least a 100 times.
Windows 10 has uploaded its key to a Microsoft database, together with some hardware identification.
You re-install Windows 10 WITHOUT a key.
1st time the system connects to the internet again it will check with the Microsoft database which will return the key matching the hardware identification for this system.
This does mean that you will loose the Windows 10 license if you change to much hardware (motherboard replacement). Changing just one component (HD, CPU, video-card) should be OK.