The reason why you get this error is that you have two versions of the same program on your device.
The first is Microsoft 365 the second is a pre-installed version of Office which causes the problem and which you have to get rid of.
1. Find the package
Hit windows button
write down Add or remove programs
2. Uninstall package
Uninstall preinstalled office package
this is not main Microsoft office
COM error is caused by conflict between two versions
and you need to get rid of that one
3. Microsoft 365 Online repair
From control panel enter your programs
find Microsoft 365 right click on that > change
choose online repair
4. Restart the Device