Hi Lubomir,
I'm Dyari. Thanks for reaching out. I will be happy to assist you in this regard.
Since your computer came pre-installed with an OEM license, this license is tied to the motherboard and should activate Windows after hard disk replacement but make sure you have installed Pro edition.
Also, try to troubleshoot it by going to Start > Settings > System > Activation > Troubleshooter.
If you bought a device from a reseller of Windows 10 and expected the key to be valid contact the reseller.
Reactivating Windows after a hardware change:
https://support.microsoft.com/en-us/windows/rea...
Get help with Windows activation errors:
https://support.microsoft.com/en-us/windows/get...
Please let me know if you need further assistance.