The use of a Windows 7 licence to activate Windows 10 was allowed during the free upgrade period, 2015 - 2016. That window has been closed, after Microsoft allowed users to continue outside the free upgrade period to activate Windows 10 using a Windows 7 or 8 licence.
Since 2023 Microsoft have closed the loophole (their words) so neither a Windows 7 or 8 licence can be used. Even though the Windows 10 licence was converted to a digital Windows 10 licence it is still based on the original Windows 7 licence. So the two are linked and one cannot be used without affecting the other.
There was also a phrase used for the free upgrade (for the life of the device) which means it cannot be transferred from the original hardware used during the upgrade.
Your Windows 7 licence is indeed retail but that only applies to Windows 7.