Open files in local or online Office applicationsFollow
The administrator of an environment can choose to open documents in local applications of Office or in the online version. To select this option as an administrator, go to the settings page. SharePoint documents and in the "Default preference for opening files" section, select one of the two options:
When you choose “Office Online apps”, it will open documents with Office Online editors.
When you choose “Office local apps”, it will open documents with the locally installed Office editors.
If you are using an incognito browser or delete your Cookies these preferences will be lost. These settings have to be set per device.
A user can still change this to their liking. This can be done from the document library itself.
This also applies for the context menu.