Following Thanos' snap (otherwise known as the Decimation) at the end of Avengers: Infinity War, a great case could be made for why he's the greatest villain in cinematic history. He defeated anyone who stood in his way, including the Avengers and the Guardians of the Galaxy, and succeeded in extinguishing half of all life in the Marvel Cinematic Universe. Thus, he achieved his dream of balancing the cosmos, leaving everyone heartbroken over the wave of death he caused.
While we're speculating about which heroes will undo what he did in Avengers: Endgame, and exactly how they'll go about this, we need to stop and consider the Mad Titan's actions. Only then can we see that, as much as we hate his genocide, it could lead to him ending up as the true hero of the sequel.
THE MAD TITAN'S EPIPHANY
Thanos sought "perfect balance" in Infinity War, but not out of some selfish desire -- heck, he doesn't even want to rule the galaxy. He saw how populations that grow exponentially devour resources and leave societies like his home back on Titan on the brink of destruction. Thanos did what he did for the betterment of existence, halving it to save its very fabric.
"You either die a hero or live long enough to see yourself become the villain," is the famous Harvey Dent quote from The Dark Knight, which applies here. That's something Thanos could recognize in Endgame. He might not be the hero of his own story, as first thought, but rather the villain -- as he did kill his adopted daughter Gamora to achieve his idea of peace. He's already conversed with her in the Soul World, telling her it cost him "everything." So, once he has had time to reflect in his fields with his scarecrow, he may come to his senses.
Thanos changed the course of reality, and he might realize it was never his destiny to do this. He could even see the error of his actions by understanding the universe is like a hydra -- wherever he thinks he stopped greed and hate from sprouting, there'll always be someone rising up to take its place. And so, Thanos might understand his snap was indeed futile, and he should let the galaxy's evolution take its natural path as intended.
The Mad Titan was initially set to narrate Infinity War, which means he does have a sympathetic antihero arc to him, and this could come full circle with his redemption. These films are a Thanos two-parter, and ultimately they can culminate in the behemoth finally accepting he was never meant to be a force of nature or to play god.