If your team is too small, you can miss out on valuable combinations of different points of view. Also, it can be hard for people to take a vacation or have to take some sick time. If I'm on a 2 person team and I am out, that means our team is running at half capacity and "the other team member" is taking all the load and all the responsibility.
The one caveat is teams that own things running "in production" online. In technology companies it's common for people to have to be on call, where they might get alerted in the middle of the night and have to take care of a problem in a service. If I'm on a team doing that, and wake up calls aren't incredibly rare, I like to have a larger group, so more of us can take on that pain.
Another way to think about team size is "lines of communication". This is sometimes called Brook's Law. This post has a great image: https://www.leadingagile.com/2018/02/applying-brooks-law/ but essentially as you add people to the team the communication channels needed to keep everyone even aware of each other's work and perspectives grow exponentially. In very large teams you can find yourself doing crazy things, like having a meeting to plan for a meeting to make a plan.