Cannabalism actually isn’t. It takes a lot of energy and resources to raise a human. Eating the dead would be less wasteful than cremation- but using the dead as fertilizer would be less dangerous than eating the dead as there are hosts of diseases and prions we can get from eating humans- especially already dead ones.
If we killed and ate live humans- that would reduce the population- which COULD be better for the environment. But a program of sensible birth control, economic changes so that we don’t require exponential increases in population, cultural changes to make breeding a sacrifice instead of an ambition, and simply living more modest and thoughtful lives with awareness to our impact and how even the little things add up to huge amounts when there are billions of us- probably a better solution without the moral and practical red tape of making mass cannibalism common and accepted practice.
We don’t have to go full vegan, we can simply avoid meat that creates a lot of greenhouse gasses, like beef and pork. Milk, too. We don’t have to cut it out completely, but a group effort to make things better can’t hurt. Vegan options can harm the environment too, after all. And as for hunger, we have enough food, it’s just a matter of distribution.
edit: somehow skipped "get"