How to Transfer a Windows 10 License to Another Computer
If you’ve ever built a computer and purchased a Windows license, you probably don’t want to buy another license for your next one. With the slmgr command, it’s possible to deactivate your old PC and then activate a new one.
Source: howtogeek.com