On a computer with a retail license of Windows 10, you can transfer the product key to a new device. You only have to remove the license from the system, and then you can apply the same key on the new computer.
How do I know if my Windows 10 license is transferable?
Transfer Windows 10 License Using A Microsoft Account To confirm if your Windows 10 license is linked to your Microsoft account, navigate to Settings > Update and security > Activation. If you get the message “Windows is activated with a digital license linked to your Microsoft account,” you are good to go.
Can I use the same Windows 10 product key on two different computers?
Windows product keys can only be activated on one computer at a time. That means you’ll have to deactivate one end in order to get another to work.