Google maintains an extensive database of all the websites the search engine has identified and saved up for use in its search results. Every page that shows up in Google's results must have first been indexed. To find new or modified pages, Googlebot browses the web; then Google reviews the pages and places them in an enormous database. Their algorithm picks the most relevant and best pages from the index and displays them as search engine results; you can control indexing by managing how robots find and analyze your online material. With Google Search Console, a free Google tool, you can inspect if your website is in the search engine and take care of any troubles that may arise. A XML sitemap is a listing of all the URLs you'd like Google to crawl and find. This helps search engines locate your most critical pages quickly. Submitting the document can help Google identify the webpages you believe are essential. To observe the status of a certain URL, utilize the URL review tool within GSC. If you discover the "URL is not on Google" status, this implies the examined URL isn't indexed and won't display in Google search results. By pressing the "RequestIndexing" button, you can quicken the indexing procedure. Your robots.txt file informs search engines not to look through certain areas of your website. It might be useful to stop Google from reading duplicate pages, secret pages, or items like PDFs and videos. You can make use of an auditing tool like Semrush's Site Audit to discover any underlying problems that could stop your site from being listed. When you manage the audit, you'll acquire a thorough view of your site's performance. Usually, indexing-relevant problems will be displayed at the beginning of the “Errors” section such as those to do with cell phone-friendliness, slow loading, and redirects. A Site Audit tool will alert you when some of your pages are being blocked by robots.txt or X-Robots tags. Googlebot will assume that it should use a different version of the page unless canonical tags show that a certain version is preferred. To enable Googlebot to index your webpage, consider removing the canonical tag from any pages that you want to be visible. Moreover, internal links enable greater navigation for the crawlers, which can speed up the indexing process. The Site Audit report will give you information related to internal links, and so it is best to ensure all of these problems have been solved. If a page is more than three clicks away from the homepage, there might be a chance that it won't be crawled and indexed. These types of pages are referred to as "orphan pages." Do something about this issue by linking to these orphaned pages. When Google sees that these pages are correlated with other internal links, it more easily recognizes their importance. Consider creating internal linking when adding new content to your website in order to hasten their indexation process. For those who own a smaller website and have determined that a notable amount of pages are not being indexed, it may be a smart idea to focus on the following.
(source: https://www.semrush.com/blog/google-index)