This is one of the most fundamental questions about now we organize our lives and the economy and society. We can't really have success as a city or country or world without a good answer.
One answer is you don't need to. Let people pursue their own sense of self-interest and the invisible hand will produce prosperity.
One major class of answers is moral suasion. The oldest answer in this tradition is religion. A more recent one is media campaigns and civil society movements, like the one over global warming.
One of the biggest problems with this is there is rarely full agreement on what the common good is. And this is where classical liberalism - both political and the classical liberalism of mainstream economics - have taken a wrong turn.