If one is morally obligated to maximize happiness for "the maximum number of people" this would also mean that one may be morally obligated to a make a minority of individuals who
are in the way unhappy in the process. Indeed, it may be worse than unhappiness for that minority. They may have to suffer injustice, even though they are innocent as individuals, in order to maximize happiness for the larger group.
Stephen Nathanson describes this criticism of utilitarianism as follows:
Against this, critics may appeal to common sense morality to support the view that there are no circumstances in which punishing the innocent can be justified because the innocent person is a) being treated unjustly, b) has a right not to be punished for something that he or she is not guilty of, and c) does not deserve to be punished for a crime that he or she did not commit.
G. E. M. Anscombe makes a similar argument. However, her objections are not just against utilitarianism, but also against any moral philosophy that claims the existence of a law-based moral obligation without also acknowledging the existence of a divine law-giver to whom we are obligated and who will make right any injustice that occurs.
This law-giver's divinity resolves the problem of injustice caused to others while performing one's moral obligation. However, if we are the ones making those moral obligations then we have to make any injustice right.
Anscombe's solution is to "jettison" concepts of moral obligation which are "only harmful" without such divinities. That would mean jettisoning any rule or act maximizing happiness for the maximum number of people. Such rules cannot be moral obligations.
That hopefully is a down-to-earth explanation of what is at stake. The OP also asks for the following:
Can you please guide me to some references where these matters were discussed?
Anscombe's Modern Moral Philosophy briefly covers the problem of moral obligation without a divine moral lawgiver. Her argument would undermine utilitarianism as well as other moral theories of obligation. From there, one can get a more specific, and positive, overview of utilitarianism from Nathanson's article discussing act and rule utilitarianism.
Anscombe, G. E. M. (1958). Modern moral philosophy. Philosophy, 33(124), 1-19. https://www.pitt.edu/~mthompso/readings/mmp.pdf
Stephen Nathanson "Act and Rule Utilitarianism" Internet Encyclopedia of Philosophy https://www.iep.utm.edu/util-a-r/