Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
This might be an old answer, but since I had the same problem just now I figured I could give you my solution.
In my case, another user had previously used the client machine with his credentials (and older version of Office). Somehow the registry locked permission to the previous user.
To get Office 365 installed (or, first installed with errors, then uninstalled and lastly installed successfully) I had to start regedit with psexec from sysinternal. Then change permissions in the registry tree from the old user to the new one and searched the registry for "ClickAndRun" and removed everything connected to Office.
After that my installationen went successfully through.