Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Your description indicates that the Office installer has crashed. Try stopping it, for example via Task Manager. Restart your computer.
If you see any traces of the broken installation, such as an entry for Microsoft 365 or Office in Installed Apps, you may have to perform a manual uninstall. For more, have a look at https://support.microsoft.com/en-us/office/manually-uninstall-office-4e2904ea-25c8-4544-99ee-17696bb3027b .
You may want to run the System File Checker before you attempt to install Office again. See https://support.microsoft.com/en-us/windows/using-system-file-checker-in-windows-365e0031-36b1-6031-f804-8fd86e0ef4ca .