Hi there,
If you change more than one hardware in the PC, the windows might not reactivate on it again as it is considered as new PC.Try deactivating the windows before the process and then after the hardware change, you can use the key to reactivate windows.
Open Settings.
Click on Update & Security.
Click on Activation.
Under the "Windows" section, click the Troubleshoot option.
Click the I changed hardware on this device recently option.
Confirm your Microsoft account credentials
--If the reply is helpful, please Upvote and Accept it as an answer--