It's not guaranteed at all to have all your pages indexed, it's at their discretion.
Google may think your site or particular pages aren't high enough quality.
- Some people actually delete pages regularly to get more search traffic for the rest.
https://www.semrush.com/blog/guide-seo-pruning-semrush/
- You may also consider excluding the pages you consider underperforming manually, rather than let Google decide.
- Improve your site in other ways (SEO) so they will index more pages