Hi and welcome to the forum
It appears you transferred an upgraded W10 license (from 8.1) from your old PC over to the new Gaming PC your friend gave to you. The original 8.1 license on that W10(W8.1) hard drive in your old PC is tied to the Motherboard in that PC and will not work in the new computer.
That's a direct violation of the Microsoft Windows licensing agreement and that's why putting the key on the new PC into the Windows Activation applet (GWA) continues to fail and pop back up on you.
To get permanent Activation on the new PC with the old hard drive, you'd have to purchase a new Windows license key for the new PC/Motherboard using the old PCs hard drive. This is one way to get there and most likely for...