Whats the flaw in it, exactly?
For example, the sacrifice of one - of Christ - gave the salvation and spiritual transformation to billions.
And we can find many examples in worldly affairs too.
The sacrifice of Christ was, in an important sense, voluntary.
Utilitarianism can work in certain limited contexts, but the utilitarian calculus is a problem - if your goal is the greatest happiness (thriving, wellbeing, etc) of the greatest number, then you can, in principle, justify the horrific treatment of a few (or more than a few) for the benefit of the many, e.g. slavery. Now, if you want to modify the calculus to reduce inequalities, you might end up with everyone equally miserable - which is not the greatest happiness of the greatest number. These are exaggerated examples, but you see the problem.
The other aspect is the definition and judgement of the 'greater good' - for example, this has been associated with tyrants who persuade their people to do horrors in the name of what they claim is the greater good. It is also the second horn of the Euthyphro dilemma ("Does God command what is good, or is it good because God commands it?"). IOW, is God just the messenger for some objective morality, or is God the source of morality? If the first is the case, God is not the arbiter of morality; if the second is the case (as in our problem of evil situation), the 'greater good' is arbitrary, dependent on God's command or whim.
Now, you may say that God is, by definition, good, therefore what God commands must be good. But this is the problem of the tyrant - if we cede judgement of the good, we must accept whatever we're told is good, whether it conflicts with our sense of natural justice or not; we have abrogated the responsibility to judge - so, God Works In Mysterious Ways, who are we to judge? IOW we exchange our natural or innate concept of 'good' for the command of the unknowable and ineffable. We effectively lose our knowledge of the good; when "what God commands " equates to "good", then by substitution we get, "what God commands is
what God commands"... the 'good' is lost. You can see the implications in the case of an evil God.
Finally, there is the problem of provenance and interpretation. Who speaks for God? Who interprets God's word? IOW to whom do we abrogate our judgement of right and wrong, and why?