If it was a Windows 8 license, that is a problem then.
Users used to be able to use a Windows 7 or 8 license to upgrade to Windows 10, then to 11, all for free.
Then Microsoft rolled out a change around Sept 2023 to close that pathway. Only Windows 10 can still upgrade to Windows 11. Windows 7 or 8 is not allowed anymore. If you have it on an existing installation, that was it. You cannot transfer it. In fact, many users also lost their Windows 11 simply doing a BIOS update or reinstall on the same hardware. Microsoft support has been consistently telling them to buy a new license.
Here are some examples of other users who contacted Microsoft Support and were told they needed to purchase a new license: