People like to be with people like themselves. So a strong society needs agreement on a core set of beliefs to remain united. A great deal of diversity can be tolerated, provided people accept these unifying beliefs. Not everyone has to accept the unifying beliefs, but if they are widely accepted, those who don’t like them will have to go along to function within the society. (Allowing people freedom to disagree with the dominant beliefs, provided they do not disrupt society was once called tolerance).
For many centuries, Christianity provided the unifying beliefs that held society together in the Western world. The principle of loving one another as Jesus loved us allows people of diverse cultures to live in unity. A tax collector and a zealot could work together, because they were committed to following Jesus.
At its best, the church tolerated a variety of cultures, provided people accepted some core beliefs. (At its worst, the church persecuted minority beliefs).
With the advance of secularism, belief in democracy has been the unifying belief that holds nations together. Now faith in democracy is on the wane, under pressure from identity politics.
In modern society, tolerance is becoming the dominant belief. Differences are to be celebrated. This has produced great freedom, but it cannot unify a society, because it builds diversity at the expense of unity. If this trend continues, society will be torn apart by class conflict and identity politics.
If there are no unifying beliefs, the only thing that can hold a society together is dictatorial state power, often justified by fear of external enemies.