Try this:
Go to Settings > System > Activation.
Click on Troubleshoot.
Once troubleshooting has completed, click on I recently changed hardware on this device.
Sign in to same Microsoft account, you previously used before hardware change.
Select your device, click Activate.
Your device should be be re-activated.
For detailed steps, you can see:
https://www.kapilarya.com/reactivate-windows-11-after-hardware-change
Let us know if this helps!
Note: Included link in this reply refers to blog by a trusted Microsoft MVP.