Hi @PC ,
if your product key is for the same version of the new installed OS it's ok and will work.
For instance: Product key for "Windows 10 Home" and installed version is "Windows 10 Home".
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten