Microsoft is better than Google in some cases while Google is better in others.
Whether Microsoft or Google is better also depends on what you're wanting to do with it, like productivity software, collaboration, enterprise IT or personal use.
Microsoft is better than Google when you have heavy spreadsheet work, complex formatting, Excel macros, and folder based email organization in Outlook.
Also Microsoft 365 also offers deeper desktop applications like Word, Excel, PowerPoint etc, as well as stronger capabilities.
Google Workspace, however shines in browser native simplicity, fast real time co-editing, and also straightforward file sharing, through Google Drive.
Many people also find that Gmail's label system as well as search driven workflow to be quicker for everyday email.
Microsoft 365, though also does provide stronger enterprise management, device control like Intune and Autopilot, compliance tools, and tight integration across Teams as well as Azure and SharePoint.
Microsoft's tools also stand out for complex, organization wide collaboration.
And Google Workspace is usually favored and best for simpler file organization in Google Drive and lightweight real time collaboration across Docs, Sheets and also Slides.
For myself I prefer Google as it has a better user experience for me at least as well as real time collaboration speed and third party app integrations, although your results may vary.