Microsoft does not allow a license to be transferred from one pc to another. It goes this far, that if you modify your current pc configuration enough, windows will no longer see your license to match your pc and deactivate the license.
Microsoft can help to activate this in case it happens, but Microsoft states that a license is bound to a computer, and if the computer changes enough, it becomes a new device, and as such, a new license is required.
This already means that it is against Microsoft Policy to transfer your license to another computer, whether it is possible or not.
That said, Windows 10 licenses have different ways to be installed into a system. A key can be inserted into the UEFI bios which is automatically found and used during install, or a key can be stored on the Microsoft servers (this is mostly the case when you have a pre-Windows 10 pc and upgrade it to windows 10.) or thirdly, you buy a license and get an actual code/the license is automatically activated.
It depends on the kind of license that you have in order to find out how transferable it is. A new laptop which comes with Windows preinstalled will have the key inserted into the UEFI bios. Although you may be able to find out what your license key is, it will be impossible to remove it from the UEFI bios, and suddenly 2 persons have access to the same key. It won't take long before Microsoft flags the key as invalid.
If the install was upgraded, the same as above applies. The laptop's hardware is tied to the license key through the Windows Servers and again, 2 persons can install windows using the same key, getting into problems.
If you have a microsoft account that holds your product key (this happens if you buy the key through the windows store), or you have another physical way to the key, you can actually make sure the new owner does not get the license and as such can't activate windows. You now have a key only you can use, but it may still be that the hardware is too different for this computer for microsoft to accept that your license is used in the same computer, and as such, they may still not allow you to activate the license and as such, you are required to buy a new license.
That said, there is a simple and legal solution.
Sell your laptop, also include the windows license, and just increase the price you ask for the laptop and state: comes with a valid Windows 10 license. Then buy a new license.