Click the three dots next to your profile picture in the upper right corner.
Select the gear icon to open Settings.
On the right-hand side, click Files.
Under the section labeled "Always open Word, PowerPoint, and Excel files in:", choose your preferred option:
Teams
Desktop app
Browser
For more information, please visit Microsoft at Default file open setting for Office files in Teams