Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Many / most new computers come with a "free trial" of Office 365 installed. If you install your own copy, it usually causes the sort of problem you see.
Go into Control Panel > Programs and Features. Scroll through the list looking for more than one Office 365 entry. Uninstall the one with the older install date. AND do an Office Repair of your remaining version. This resets all of the registry entries to point to it and should clear up your activation issue at the same time.