One of the reasons why larger sites (those with more pages) often rank higher is because they have had more time to build up quality content, expand their services, and gain valuable backlinks. It isn’t the number of pages alone that’s pushing them to the top of the search results.
Search engines favor quality content over quantity. If you have several hundred pages that say next to nothing and provide no value for your readers, that is not going to do much for you in the way of SEO. It is much better to focus on building the content, keywords, resourcefulness and overall quality of your pages, while working to expand over time.