"The trolley problem is a thought experiment in ethics about a fictional scenario in which an onlooker has the choice to save 5 people in danger of being hit by a trolley, by diverting the trolley to kill just 1 person."
The trolley problem gives you a choice to take action that kills 1 person, or take no action which results in 5 people being killed but not because of you.
Now, rules would say:
Its always wrong to kill innocents.
Therefore, you acting to kill 1 innocent person would be wrong even if it saves 5 lives as its result.
Consequentialism based on life or happiness would say:
Action that contains harm, but is more beneficial than harmful, is a good action.
Therefore, such consequentialism would justify the action that kills 1 person to save 5.
Consequentialism based on reduction of pain would argue that its same either way, as those 5 people would likely experience a lot of pain in life and even cause pain, so saving them this one time does not guarantee a reduction in pain.
But what I noticed is that most people are incapable of comparing benefits and harms. In fact, most people fall for bias and search only those information which support their view. Therefore, most people are not capable to use consequentialism in a way that its supposed to be used. This is why for them, its better to rely on rules.
The basic rules, such as do not lie, are often violated by people who think it brings some greater benefit. But ultimately, it produces a society of liars, because you cannot lie and expect that nobody else does the same.