Studying alone is much better!
Of course, schools teach a lot, and you are not alone there, but when I am alone in the comfort of my home, without interruptions, in a peaceful and silent environment, I have the feeling that I learn much more.
Obviously going to school/college is very important, but it is also essential to take some free time to study alone, as the absence of people helps with concentration, making the brain work better.
So, in my opinion, you learn a lot more when you study alone!