One word solution: tolerance. If you expect others to live and believe as you do … or else … there’s no solution. Just centuries of feuding.
Historically, tribes, city-states, they all had problems just as or more severe than ours.
We have living examples - today - of countries in the world which are faring very well. (Oh of course, some would say, they’re all doing something wrong. Uhm, no.)