If you own a retail license, you can easily reactivate by entering the product key again.
If you don't have a product key, you can still reactivate by signing into your Microsoft account having digital license.
Kindly refer steps in this support article:
https://support.microsoft.com/en-us/windows/activation/reactivating-windows-after-a-hardware-change
Let us know if this helps!