That's a broad question. If using a front-end tool like React, you make the call to the back-end api, that might make a GET request to the database as in the article, in the useEffect hook.
The web page renders and while rendering is invoking the call to the database. After the data is recieved it is rendered to the page.
You shouldn't be grabbing so much data that it takes more than a second or two to display. But while it is fetching the data, you should show a loading image or loading skeleton.
This may help