Hi, I'm Robinson, and I’m happy to help you today.
The first thing that you need to check is if you are using an OEM or a Retail license. You can do it using this procedure.
1-Right-click on Start then click on Windows PowerShell(admin)
2-Type this command and press Enter:
slmgr /dlv
3-Then a pop-up window will open with your license information (check the image below to see how to identify which type of Windows license you are using)
If you are using a Retail license and you are using a Microsoft account to log in on Windows, your Windows license is attached to this Microsoft account. In this case, you just need to sign in on Windows on the new computer using the same Microsoft account, run the activation troubleshooter and select the option "I changed hardware on this device recently".
1-Select the Start button, then select Settings > System > Activation > Troubleshoot. The troubleshooter will show "Windows can’t be activated on your device".
2-Select "I changed hardware on this device recently", then select "Next".
3-Enter your connected Microsoft account and password, then select "Sign in". The troubleshooter will only work with the connected Microsoft account.
4-From the list of devices that are linked to your Microsoft account, select the check box next to "This is the device I’m using right now". (Only your old computer will be shown in the list, you need to select it)
5-Select "Activate".
You can see more information about the reactivation of Windows after a hardware change at this link.
https://support.microsoft.com/en-us/windows/rea...
I hope this information helps. If you have any questions, please let me know and I'll be glad to assist you further.