Your current method is correct, install Windows 10 Pro via media creation tool.
But the general key VK7JG-NPHTM-C97JM-9MPGT-3V66T is not an activation key(license), it can only help you pass the Windows 10 Pro installation process, can’t activate Windows 10 after install.
You need to find out your Windows 8.1 product key, keep computer is connecting to Internet, then change the product key by the following steps:
Open Settings.
Click on Update & security.
Click on Activation.
Click the Change product key link.
Type the 25-digit product key.
Click Next to complete the process.
Reference:
You Can Still Get Windows 10 for Free With a Windows 7, 8, or 8.1 Key
https://www.howtogeek.com/266072/you-can-still-get-windows-10-for-free-with-a-windows-7-8-or-8.1-key/
-------------------------------------------------------------------------------------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.