Hi Dan Bergström, thanks for posting!
To move Microsoft 365 from your old computer to a new one, first sign in to your Microsoft account on the new PC at account.microsoft.com/services. This must be the same account you used to purchase or activate Microsoft 365.
Second, download and install Office by selecting Install Office from your account page. This will install the latest version linked to your subscription.
Last, if you no longer need Office on the old computer, you can deactivate it from the same page under Devices. This frees up your license for the new PC.
If this helps, feel free to mark the answer as accepted so others can find it too.
Best,
Carl