Source: Radio Times

Philosophy is the study of fundamental nature of reality and existence. Moral philosophy deals with ethics and the concepts of 'right’ and ‘wrong’.
Often considered the ‘holy trinity’ of the Marvel Cinematic Universe, Iron Man, Captain America and Thor can be used to explain the three basic ideas of morality, namely, Utilitarianism, Deontology, and Virtue Ethics respectively. The somewhat opposing ideas of Utilitarianism and Deontology are seen best in Captain America: Civil War, where Captain America and Iron Man find themselves in opposing teams, divided by their views on the Sokovia Accords that bind the Avengers to the government.
The basic idea of Utilitarianism can be summarised by 'end justifies means’. According to this principle, your intentions do not matter if the consequences of those intentions are good. Tony Stark aka Iron Man embodies this ideology the best as is evident from Civil War where he is ready to give up the freedom of the "superhuman" individuals in order to provide protection to the general public. Here, the intentions may not be ideal but the final motive is good. As per this ideology, as special as you think you are, you are not more special than anyone else. This makes it different from egoism, which bases itself on self-good. This further explains the arc of Tony Stark from a self-indulgent narcissist to a superhero. Utilitarianism may be Classical Utilitarianism which advocates for the greatest good for the greatest number of people. However, consider a situation where 5 people are dying, one from heart failure, one from lung failure, two from kidney failure and the last one from leukaemia. As the doctor of all five of these individuals, are you obliged to kill a healthy man and donate their organs to you patients? According to Classical Utilitarianism, you are. Because that would give the greatest good for the greatest number of people. But it is still murder. Thus, the Classical Utilitarianism fails. Another idea set forth is that of Rule Utilitarianism, according to which we live by rules that lead to the greatest good for the greatest number of people generally.

The next principle is that of Deontology, which bases itself on principles and duties. This ideology is personified in Steve Rogers aka Captain America. A deontologist criticizes a Utilitarian in their idea of “end justifies means” as they believe that certain “means” must never be used irrespective of how good the “end” may be. Again, in Captain America: Civil War, Cap doesn’t allow for the freedom of the individuals to be compromised for protection. For him, the freedom of the people is too high a price to pay for their protection.
A differentiating factor between a Utilitarian and a deontologist is that a Utilitarian may change with circumstance while a deontologist doesn’t. Tony Stark decides to sign the Sokovia Accords only after his conversation with a grieving mother, whose son died due to the uncontrolled actions of the Avengers. Whereas for a deontologist, such as Captain America, right and wrong do not change with circumstances. However, this isn’t to say that deontologists view the world as black and white just because they think in absolute terms like 'right' and 'wrong' and not relative terms like 'better' and 'worse’. For a Utilitarian, the only right decision is the best one, one that gives the most positive results. But for a deontologist, broader concepts of liberty and freedom, that Steve Rogers values, are in play. Sharon Carter, states in Civil War,
Compromise where you can, where you can’t, don’t. Even if everyone is telling you something wrong is something right. Even if the whole world is telling you to move, it is your duty to plant yourself like a tree, look them in the eye, and say, 'no, you move’.
A big similarity between Tony Stark and Steve Rogers and the ideologies they embody is conviction. Both require to make decisions that affect millions if not billions of lives. So a strong conviction is necessary.
The third principle is that of virtue ethics. Like a deontologist, someone with this morality thinks of doing the 'right' thing. Thor Odinson exemplifies this ideology well. However, unlike a deontologist, doing the 'right’ thing is second nature to them and not the matter of 'duty’. Virtue, here is defined as doing the right thing at the right time, in the right amount, towards the right people. However, how does one know what all these are? According to moral philosophers, you learn through experience. In fact, according to them, you don’t need to be specific in this definition because one who embodies this ideology knows the hows and the whats. The ideology is explained in terms of 'eudaimonia’, which is a Greek word that has no English counterpart. It can be translated roughly to 'a life well lived’. In Avengers: Infinity War, inspite of having lost everyone and everything he called his own, Thor is determined in defeating Thanos, for no reason but the sheer will to do good. He is not bound by duty or principle to do so, like Cap is. Evidently, this idea is shared by many in Asgard, the home of Thor, including his father Odin and mother Frigga.
Captain America and Iron Man can be said to display virtue as well, however, they differ from Thor, in that their virtues do not account for how they make their moral decisions. Thor does not weigh the positive and negative effects of alternatives like Tony does, but lets his instincts guide him. In this way he resembles Captain America.

The three ideologies do, in fact, coincide since they’re all seen as ways to do the ‘right’ thing, whether by duty or by character. Ultimately, they all serve as examples to aspire to be our own heroes.