Some users prefer to open Microsoft Office documents via the Office web apps, others prefer the Office desktop apps.
By default, documents will open using web apps.
You can change this behaviour by opening Word, Excel or PowerPoint and going to File >Options >Advanced >Link Handling and selecting ‘Open supported hyperlinks to Office files in Office desktop apps’
This feature works for links to Word, Excel, or PowerPoint files, stored on OneDrive or SharePoint, that you click in Word, Excel, Outlook, or PowerPoint for Microsoft 365 on Windows or Mac.
Once a user turns this feature on, it will apply to all three apps – Word, PowerPoint, and Excel.
If you are using a Mac you can change the setting by going to Preferences > General > Link Handling.