When hanging out in-person, I find that groups of three are way better than groups of four.
Three has some advantages over two, including that any person can take a break from speaking without the conversation halting, but a two-person hangout can also feel delightfully intimate and flexible in its conversations. Three has some advantages over big groups, including that it's easier to notice if anyone is being left out of conversation, but a big group hangout can also be fun for talking to many people and having a wide variety of conversations (if the physical space is set up well for that).
But I think four is pretty much always worse than three. Four is too small to gain the benefits of big group conversations, but too big to feel intimate. Three is the largest group size where there are no conversations between a subset of the participants (unless one person isn't talking at all). With four people, there's the option to talk in pairs, which I find quite awkward to navigate - especially in the situation where a conversation between one pair naturally ends, but the conversation between the other pair is going strong and hard to join.
In big groups, there are more people to talk to and flexibility to move between conversations with different people. In small groups, the conversations can feel more intimate and in-depth. While each conversation and hangout has its own dynamic, I find that three-person hangouts generally have more conversational benefits and four-person hangouts awkwardly get the worst of both worlds.