There's really only one scene in Avengers: Infinity War in which the heroes get the upper hand against Thanos, who begins the movie already powerful enough to win each of the Infinity Stones one after another. When the Guardians of the Galaxy team up with Iron Man, Doctor Strange and Spider-Man on Titan, they manage to temporarily immobilize Thanos and nearly remove the Infinity Gauntlet. Ultimately they fail, but in spite of the rout that follows, all survive long enough for their fates to be decided by the Snap at the end of the film -- even the three characters who were directly hit by the force of the Power Stone.
Star-Lord, Drax and Nebula are regrouping after a physical attack when Thanos hurls the three away again with a blast of energy from the Gauntlet, a purple glow showing which of the Stones is being used. From what we've seen so far, the Power Stone is the sledgehammer of the Infinity Stones: it destroys anything, up to and including entire planets, but it's not a weapon easily tempered. However, after Thanos leaves the scene, the three Guardians are all seen back on their feet, apparently only having been stunned by the blow.
In Guardians of the Galaxy, Peter Quill and his new teammates, including Drax, not only face the Power Stone, but collectively manage to handle and use it to defeat Ronan the Accuser. This could have explained those two gaining some special resistance to it, but Nebula was an enemy at the time, and wasn't present for that battle. She's since become an ally and perhaps an honorary Guardian, but on Titan, she was hit by the Power Stone the same as the others and walked away from it no worse off than them. It seems, then, that the non-lethal effect of the attack had to be deliberate on Thanos's part.
This isn't the only point in the movie that Thanos spares a few lives when it would have been easier for him to crush them and let his impending Decimation Snap sort out the remainder. But it's notable since it comes at a moment where he's otherwise unconcerned with holding back, blinded with fury over his brief entrapment and the loss of his "favorite daughter," Gamora. Finding some canon-compliant reasoning behind the scene, a theory on Reddit has come up with a way that he could have restrained himself from unleashing the full force of the Power Stone -- he activated the Soul Stone at the same time.
It totally makes sense, too. Just after the surge of purple light, we see the orange glow of the Soul Stone as the scene cuts, meaning that it was also in use.
The Soul Stone has had the least screen time in the collective Marvel Cinematic Universe, so its powers haven't yet been clearly defined. However, it seems reasonable to assume that it can protect a life from the influence of a different Stone, especially since an important aspect of Thanos's plan was that only half of the life in the universe would be annihilated.
Why the Mad Titan would make the effort to keep these particular three heroes alive until the end of the film could have a few different answers. When he first appears he doesn't show much regard for individual lives. He's calmly slaughtering the Asgardians who came between him and the Space Stone, and every account of his past actions shows that he was ready to murder half of any world's population manually if he didn't have the tools to do it with a snap. But as Infinity War goes on, his tactics seem to change, and once he has the Soul Stone, he opts to take on numerous one-on-one battles and to fight (somewhat) fairly against Captain America, rather than wiping out huge swaths of sentient life as he has before. His sense of honor may have been enhanced over the course of events, or he may just now feel certain enough of his success that he would rather let the random selection of the Decimation take over.
Considering his grief for Gamora, he may even be making a special exception for her sake, sparing her boyfriend, friend and sister. It's also been widely hypothesized that Gamora, having been sacrificed to the Soul Stone, may now exert some control over it, and therefore Thanos' use of the Gauntlet. Could she be the one who activated it at the crucial moment to keep her loved ones safe?
If it's true that the Soul Stone was in play on Titan, there may be additional insights to the characters, and to the powers of the Stone itself, waiting to be revealed. Thanos is already a far more complex villain than we've seen in most comic book movies, and the conscientious thought that sometimes laces his genocidal goals is what keeps him interesting. The way he understands and uses his nearly unlimited power will define the future of the MCU.
Avengers: Endgame will hit theaters Apr. 26. Directed by the Russo Brothers, the film stars Robert Downey Jr., Josh Brolin, Mark Ruffalo, Tom Hiddleston, Chris Evans, Scarlett Johansson, Chris Hemsworth, Jeremy Renner, Chris Pratt, Elizabeth Olsen, Chadwick Boseman, Anthony Mackie, Sebastian Stan, Benedict Cumberbatch, Paul Bettany, Samuel L. Jackson, Tom Holland, Cobie Smulders, Benedict Wong, Zoe Saldana, Karen Gillan, Vin Diesel, Dave Bautista and Pom Klementieff.