This is very true and so important to your professional growth. There's a famous saying, "if you're the best one in the room, you're in the wrong room".
At my last job I was the only developer at a small web agency, along with a designer and a project manager. Basically every problem and solution I had to figure out myself, and while I did that, due to time constraints I often had to go with just what worked, rather than figuring out the best of all possible options.
At my current job, there are developers who know a lot more than me, and in the time I've spent working with them I've found I learn so much more so much more quickly than I did when I was working on my own.