Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
You do not need to manually transfer the license because Microsoft 365 is tied to your Microsoft account rather than a specific computer. A Microsoft 365 subscription generally allows you to install and use the apps on up to five devices at the same time, so your old iMac no longer working will not prevent you from setting up your new MacBook.
To install Microsoft 365 on your new MacBook, open a web browser and visit the official Microsoft account services page at account.microsoft.com or Office.com. Sign in using the exact Microsoft account associated with your Microsoft 365 subscription.
Once signed in, locate your Microsoft 365 subscription and click the option to install Office. Download the Mac installation package, which is a .pkg file. Open your Downloads folder and double-click the downloaded file to start the installation. Click Continue, review and accept the software license agreement, select the destination disk if prompted, and click Install. Enter your Mac administrator password if requested, then follow the remaining instructions to complete the installation.
After installation, open an Office application such as Microsoft Word or Excel. When prompted to activate the software, sign in with the same Microsoft account associated with your subscription. The applications should then activate automatically, provided your subscription is active.
If you are using a standalone, one-time purchase version of Office, such as Office 2021 or Office 2024, rather than a Microsoft 365 subscription, the activation and device-transfer requirements may differ. In that case, check your Microsoft account for the license and any applicable device limits before activating Office on your new MacBook.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin