Make sure you register the machine to be retired as a Microsoft device by changing your login to a Microsoft linked account.
Copy or Clone the Windows 10 partition of the machine you want to retire (e.g. where the license is moved from)
Make a fresh install of Windows 10 on the new machine. The fresh install does not need the linked account to be activated later.
Move the cloned Windows 10 partition after the fresh install.
Modify the BCD Store to a dual-boot configuration. This is easiest done with
EasyBCD.
Boot into the cloned Windows 10 partition which was activated before, then go to Settings –> Update & Security –> Activation. Select Troubleshoot (which is not available on a fresh install), then I changed hardware on this device recently.
Activation will take you to your Microsoft account. Select the machine to be retired (see step 1) and select the check box This is the device I’m using right now, and then select Activate. The machine data on Microsofts servers will now be replaced with the one from your new machine.
Boot offline into the fresh install and change machine name (and work group) to the one used in the cloned install. Reboot, then connect internet.
Wait for auto activation or go to Settings –> Update & Security –> Activation and click Activate. The fresh install will now be activated.
Delete the cloned install. Using the fresh install ensures that you do not carry outdated drivers and apps for the retired machine with you.