It's a weird movie in a way, at least when it comes to the ending; it feels disjointed for the most part because most of the movie is a reasonably light-hearted sci-fi-action-comedy that can't tolerate being serious for more than five seconds before they need to crack a joke somewhere to break the tension. Having a lot of characters "die" before the curtains fall just doesn't match up with that IMO.
Annnd let's not even get into the glaring power tier plotholes left and right. Or the shitty trope of "nuuu I'll gibe u the stone just let this dude live", although that was Strange who already Knows everything. Which is a whole 'nother plot hole in of itself (I mean he already fucked up the timeline in his own movie by not allowing the universe to be consumed or whatever, why not just do it again subtly and idk, destroy the time stone anyway? Kill Thanos' parents before he's born? There's about a bajillion possibilities, and that's why time travel / manipulation in fiction is pretty much always a bad idea.
And don't even get me started on that silly battle. Spears and shit, really. When you claim to be the most technologically advanced people in the world, and while Stark and co has literally nanomachines, and there's gods around, and space, and shit? I mean use some lazors on those dropships or whatever. There was an army of full auto iron men a few movies back, why's there not a factory spewing those out by the billions yet? I mean screw moral choices of e.g. using nukes or space tech superweapons or sentient AIs (you lot already crossed that bridge) or have Tyrion make a couple more god weapons (and that storyline implies that the forge had been running for a while before Thanos did his thing, where'd all those weapons go? Plus it looks easy enough to use it, fix that shitty iris, churn out weapons, ????, profit), there's an invading force that will kill half the universe and shit. And you're using spears and some shitty variation of "For the Horde!" and some Spartan grunts to stop it? Fuck off pls.