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

https://medium.com/javascript-in-plain-english/using-reacts-useeffect-hook-to-fetch-data-and-periodically-refresh-that-data-2a69b6d44081

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store