As a beginner, I prefer studying alone to focus on what I struggle with.
As an upper-intermediate/advanced learner, I prefer studying in a group because it's a great opportunity to practice speaking, listening, and vocabulary. Actually, I used to think that for an introvert like me, studying in a group would be uncomfortable. But when I was attending FCE preparation courses, I changed my mind. There were just around 7 people in our group but they all were from different backgrounds and it was immensely enjoyable to spend the 2 hours the class lasted with them. One of them was a doctor, two of them (+me) were still students, two of them were university teachers, and one of them was married to a German and already had a C1 level in German and a child. So as all of us were very different, it was interesting to share our opinions, discuss, joke around, learn something from each other, and improve together.
I prefer to use both of the way.
A group helps me to improve my speaking and listening skills.