Hi,
In this case, when you upgraded from Windows 7 to 10, it became an OEM license because you changed the motherboard to which the license is tied. You won't be able to use that same license.
You would have to buy a new license if the Windows 7 keys are not valid to activate on Windows 10 or 11, even after upgrading via OEM license.
OEM licenses are tied to the hardware, so the license is on the old motherboard.
I'm sorry.
On the new computer, you can install Windows 11 directly if it's compatible and buy the license from the Microsoft Store or the Microsoft website.
Please consider rating the question (accept the answer or not), and access the community at Microsoft Q&A if you have further questions.
Thanks