In Teams click on the ellipses next to your profile photo.
Select Settings.
Click on Files and links
Change how files are opened.