
Hi @Yichen Name ,
You need to install Office Online Server(OOS, the next version of Office Web Apps Server) for SharePoint 2016 to open docemnrt files in the browser. I tried other methods of opening sharepoint documents in the browser on the web and they all failed.
If you need to, please check the following link to learn how to install and configure Office Online Server.
Configure Office Online Server for SharePoint Server 2016
How to Install Office Online Server for SharePoint 2016
I also found two threads with the same problem as yours, you can refer to:
https://sharepoint.stackexchange.com/questions/266982/sharepoint-on-premise-server-2016-open-documents-in-online-mode
https://sharepoint.stackexchange.com/questions/238574/sharepoint-2016-on-premise-force-ms-office-documents-to-open-in-browser
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.