You can no longer use a Windows 7 licence product key to activate Windows 10. Microsoft closed the loophole in Sept 2023 for both Windows 7 and 8. The official free upgrade was 2015 to 2016.
You will need to buy a Windows 10/11 licence to activate Windows 10.