How to deactivate windows.
After that, on the new/other machine, set up a user account with your microsoft account, or connect an already existing user with it. After that, Windows should activate itself automatically by reading the Product Key from your Microsoft account. If that doesn't work, you'll have to enter the Product Key manually - Windows should prompt you for it.