Is it a digital license rather than a Product Key? Because for me I have a Digital License tied to my Microsoft account instead of an actual physical Product Key. So when I upgrade or switch to a new computer I use my LINKED Microsoft account (MUST be linked already before you switch) to prove that my License is mine. HOWEVER, there are important steps which must be taken before switching as you first have to deactivate it on the account BEFORE switching or it will fail when you try to validate your new PC.
I got my info here: https://www.tomshardware.com/how-to/transfer-windows-license-to-new-pc