Hi,
I am Sumit, an Independent advisor and a Microsoft MVP here to help.
If Windows 7/8/10 came preinstalled with the computer, that is called an OEM license. For an OEM license, the license dies as soon as Motherboard dies. So essentially it is non-transferable. If that is the case you need to get a new license.
However, this is not same for retail licenses i.e. you purchased the license through Microsoft store. That does carry transfer rights. If that is the case, please see the below steps:
What you need to do is to grab the key using any Software like Showkey Plus, uninstall that key from older PC and use it on another computer.
Download Showkey Plus:
www.thewindowsclub.com/showkeyplus-product-key-finder
Uninstall the key
https://winaero.com/blog/how-to-deactivate-wind...
Use the key by Showkey Plus on the newer computer.
Alternatively, there are two more options available other than this:
Contact Microsoft at https://partner.support.services.microsoft.com/... through chat support. They would take control of your PC and activate(might need a proof of purchase)
Use the Activation troubleshooter on the new PC signed in with same MS account.
Go to Settings>Update and security>Activation and run the troubleshooter.
Select I recently changed hardware on this device.
Please let us know if you need any assistance.