One of Thor’s most impressive moments in Thor: Ragnarok, Thor used the Dwarven forge on Nidavellir to craft Stormbreaker. Due to both the nature of the weapon and Thor’s attack on Thanos, Stormbreaker successfully powered through an energy blast from all six stones and dealt a near-lethal blow to Thanos.
Thor’s first legendary weapon, Mjolnir, was destroyed by Hela in Ragnarok, and while Thor’s divine powers worked with or without the Uru hammer, he was at a disadvantage going up against Thanos without such a powerful weapon. Thor’s replacement, Stormbreaker, lacked the iconic worthiness enchantment of Mjolnir, but it had other special abilities. This included an ax blade and the ability to summon the Bifrost, allowing Thor to travel across the Nine Realms.
Towards the end of Infinity War, Thanos collected the Mind Stone, becoming the most powerful being in the universe, when he was ambushed by Thor, who assaulted him with lightning before throwing Stormbreaker. Thanos fired an energy beam from the Infinity Gauntlet, but Stormbreaker was unimpeded and became embedded in Thanos’ chest, nearly killing him. Stormbreaker and the Infinity Gauntlet were both made by Eitri, allowing the Uru weapon to counter the gauntlet’s energy, plus Thor caught Thanos off guard with his nearly decisive attacks, explaining how the God of Thunder was able to overpower the Mad Titan.
As Thor described in Infinity War, Stormbreaker was a “Thanos-killing” weapon. Like Mjolnir, Stormbreaker is one of the most powerful weapons in the universe, and both Uru hammers nearly deal killing blows to Thanos in both Infinity War and all six Infinity Stones. This was confirmed by Infinity War’s directors and screenwriters shortly after the film was released.
The Russo Brothers also stated that Thor’s surprise attack on Thanos helped him overpower the Infinity Gauntlet’s beam. Even for a being as tough as Thanos, the six Infinity Stones were extremely difficult and physically taxing to use, as revealed in Endgame. The stones’ power, combined with Thor’s lightning and Thanos’ surprise, likely prevented him from using the gauntlet’s full power.
In a meta sense, Thor’s near-victory in Infinity War showed how close both parties were to victory before Thanos ultimately prevailed. Thor had the element of surprise and a weapon capable of overpowering even the Infinity Gauntlet. Stormbreaker powered through the gauntlet’s energy beam but left Thanos alive long enough to succeed, making his victory in Avengers: Infinity War all the more devastating.