I think it is better to study with friends.
This is because you feel more comfortable when you are with people you know well.
As a result, you can focus more on studying.
On the other hand, if you study with new people, you may feel nervous or uncomfortable.
For this reason, I prefer studying with friends.