Hello
If your device has an OEM home license, do this first: You can go to Settings > System > Activation > Change product key
Disconnect internet, and disable any third party antivirus, key in the generic key instead: VK7JG-NPHTM-C97JM-9MPGT-3V66T
That should get you to Pro. Once restarted, you can connect back to the internet, sign into your Microsoft account. See if it is activated.
Otherwise, go to Settings > System > Activation, run the troubleshooter, choose the hardware change option. When it asks you where it is installed on right now, you should choose the old device name. Then click on Activate button. And on the next screen when it asks you where to transfer it to, choose your new device name. See if that does the trick.