Hello.
The license itself is not linked to a Microsoft account. The license is linked to a PC (licensed PC), and this PC is already linked to a Microsoft account. In other words, the license is assigned not to the owner, but to the computer. And according to clause 4 of the Windows EULA, you have the right to transfer the license you purchased along with the PC to the new owner.
If you have purchased an upgrade from the Home version to the Professional version (it is the upgrade that is sold in the Microsoft Store), then such a license is permanently assigned to the PC on which it was purchased and the upgrade was performed. When purchasing such an update, a unique key is not sent (after upgrading to the Professional version, the Home key changes to the well-known "plug" VK7JG-NPHTM-C97JM-9MPGT-3V66T. When reinstalling the OS, activation is picked up automatically when the Internet is turned on, since information about the PC and the upgrade license is stored on Microsoft servers.
If you have purchased a license for the full standalone version of Windows Professional edition (not in the Microsoft Store, but on the Microsoft website), then you should receive an email with a unique product key by E-Mail after payment, which you must transfer to the new owner in case of sale of the PC along with the OS.
I have described all the options in detail so that everything is immediately clear, but in any case, the license terms explicitly allow you to sell/transfer the PC along with the OS license.