To understand morality, what it can do and why, you need to know where it came from. Our sense of morality is an evolved characteristic. Just like our sense of hunger or our sense of heat or cold. For a very long time humans, and also our ancestral species, have lived in groups. Our evolutionary near neighbors the chimps also do.
It suggests we have been doing this tribal thing for at least several million years. A huge part of our survival strategies has been cooperation. Without the group, an individual is unlikely to live very long. And further, even if he does survive, is almost guaranteed not to leave progeny.
So, behavior that gets you shunned is gene death. And over periods of millions of years, it is unsurprising to find, our mental facility has been tuned to this fact. Being shunned is seriously unpleasant, possibly even physically harmful.
Humans have brain structures that literally makes you sick when other humans are injured in your sight. Other structures make you sensitive to the emotional upset of your companions.
Individuals who lack crucial parts of this are often quite detectable by normal people, and seem "creepy." This is also due to brain differences.
Generally, if some behavior causes you to get shunned by your fellow tribe members, and if it has a genetic component, that behavior gets filtered out of the gene pool remarkably efficiently. If some behavior makes you likable, popular, etc., and has a genetic component, that gets reinforced. Over many thousands of generations the result is a fierce alliance to behavior that works. And a keen need to know what the correct pattern of behavior is that will work.
Sometimes this short circuits in situations that evolution finds challenging. For example, when changes in culture happen much faster than evolution can keep up with. Or when cultures meet and neither previous culture can completely successfully please the other. Or when group size grows from a few dozen families to millions of people. Or when ideologues impose their ideas.
This is unsurprising. Our sense of hunger was developed over many thousands of generations in which the next morsel of food might be the last food you got for an uncomfortably long time. So if you had food, you ate it. If you didn't, and the food spoiled or was scarfed by somebody else, maybe you starved to death. Or didn't have the energy to run away from a tiger. But now, our sense of hunger has challenges when as much food as we can deal with is available for an amount of money most people can afford. When we have too much food we have a tendency to eat ourselves sick.
So a sense of morality comes from the same place as a sense of hunger. Or a sense of needing to sleep. Or a desire for a mate. Or any of the many drives humans have. And it can get mis-aligned with reality in many very similar fashions.
These days we have the idea of a "first world problem."
Our sense of morality evolved when it was life-or-death. 100,000 years ago the complaint was "he's got a bigger chunk of the meat we both just killed! It's not fair!" In that era, the guy who took more than his share might well doom other tribe members. These days, our sense of morality is getting mis-fired by things that, when you rationally evaluate them, are quite silly. "He's got a bigger color TV than I do! It's not fair!"
So, how do we evaluate morality? On the basis of human thriving. As I stated, a huge part of our survival strategy is cooperation. That means the things that permit and encourage cooperation are moral. And will fit our evolved sense of morality and make us comfortable with how people behave. We should be asking questions like, will this moral instruction generally help humans thrive or hinder that? And over what time scale?
And cooperation for what? Actions are moral that are positive for the long-term thriving of the individuals that make up the community. Actions that are negative to that are not moral. Actions that don't make any difference are neutral. So, for example, if somebody performs some action that helps people, and so makes money for it, all through voluntary trades, this is moral. That grocery store down the street that operates by providing the highest quality product at the lowest price they can, and does so entirely through voluntary trade, and so gets all the business of the community, helps the community. And is therefore moral.
However, note that I said "cooperation." Actions that, for example, make a slave out of some portion of the tribe are the opposite of cooperation, and so are not moral. Mugging some guy to get money to buy lunch is, according to several million years of evolution, against our sense of morality.
This is just as sure as that food is good to eat, but that non-food is not. Because it is based on the same source and context.