I was in this same situation earlier this year with one machine that was using a license attached to my Microsoft account. From what I read online, I thought I was freeing up the license by running "slmgr /upk" and "slmgr /cpky" on the old machine, but I guess not. I was eventually able to get the license transferred to the new machine, but only after a very painful morning of working with an MS support person.
I learned that there are two ways of buying a Windows 11 license. One way results in getting a traditional license key that can be reliably transferred, and the other way (tying the license to your Microsoft account) risks losing your license. :( I'm very careful to only buy licenses the former way, now.
It's just a matter of buying from the right web page at Microsoft's web site. At least as of June, I was able to buy a license with a traditional license key here:
I learned that there are two ways of buying a Windows 11 license. One way results in getting a traditional license key that can be reliably transferred, and the other way (tying the license to your Microsoft account) risks losing your license. :( I'm very careful to only buy licenses the former way, now.