When you search on Google (any other search engine) a preparation works in the backend to bring you quality results for the query.
Preparation work is basically divided into 3 main stages. 1. Crawling 2. Indexing 3. Ranking
Search engines have a number of computer programs are known as crawlers, to find information that is publicly available on the internet.
These programs scan the web and create a list of all the websites by visiting each page of the website by reading HTML code.
After the information is identified by crawlers, that information is organized and stored in a particular format in the database by indexers, also known as indexing.
if your website is not on the index it will not appear in any search engine.
After the completion of indexing, the main part is ranking. It is the process to decide which pages to show on the search engine results page.
This ranking process depends on search engine algorithms that work in real-time