Most countries with multi party systems use different methods for selecting their representatives. When you do a straight aggregation of geographical areas in which you take whomever gets the most votes in each area (sometimes called first past the post) it becomes possible for the most disliked party in a country to win, widely geographical distributed concerns (like ecological concerns) become underrepresented, and most relevant to this conversation, having multiple parties that are close to each other is a huge disadvantage compared to having a single party attracting more people. Because of this, countries with this system will usually see smaller parties merge and stabilise on a 2 party government / opposition set up.
The study of how different kinds of voting systems work and their advantages, disadvantages and consequences is called social choice theory. There's an interesting theorem called Arrow's theorem that proves that given a certain set of assumptions, there can be no voting system that works exactly as we would like. Sometimes this is used to argue that all systems are equally bad, but I think this is not true at all - even while imperfect, some systems are much better than others.
You remind me of Veritasium's video [1]. I should rewatch it and pay actual attention.
[1] https://www.youtube.com/watch?v=qf7ws2DF-zk