Google’s algorithm crawls your website and keeps these pages in their index so they can show up in search results for specific queries. You can check the Google Search Console (GSC) to see how many of your pages are in their index.
If you keep adding new content and keeping a valid sitemap, this number should keep rising. Unless, of course, if you intentionally delete some pages. However, if this number declines suddenly or over time, then you might have a problem.
Why does this happen?