Hi,
Regarding your request to transfer a Windows license: did you purchase the license separately, or did the computer come pre-activated with a license tied to its hardware?
If it is a license that came with the computer, it is an OEM license, which is non-transferable; unfortunately, you would need to purchase a new license.
However, if you purchased the license separately—whether it is a physical license (a 25-character key) or a digital one—you can follow the steps here:
https://support.microsoft.com/en-us/windows/activation/reactivating-windows-after-a-hardware-change
If you have a 25-character key, ensure it matches the correct edition of Windows. You can enter the key during the Windows installation process, or, if Windows is already installed, go to:
Start menu > Settings > System > Activation > Change product key.
Please consider rating this response (by accepting the answer or otherwise) and visiting the Microsoft Q&A community if you have any further questions.
Thanks.