When you add a modern page to a site, you add and customize web parts, which are the building blocks of your page. This article describes the File viewer web part, which was previously called the Document web part.
In this video, I show you how you can preview/dynamically display a document in SharePoint using the File Viewer Web Part. For other ideas and tricks, check out this post:
As you maintain thousands of documents in SharePoint document libraries, it is inadvertent that you might open documents just for the sake of knowing what the document is all about. Would not it be nice to save some time and see the contents of a document without clicking on each one? With this post, I would like to list a few options for you to preview a document in SharePoint.