When Thor, Captain America, and Iron Man were fighting Thanos, it seems like one of the simplest ways to defeat him would have been to pin him with Mjolnir and then kill him with Stormbreaker. Of course, it's not an easy task, but Thanos was lying on the ground at one point, so it might have been possible.
It would have been particularly effective because Thanos did not have the Infinity Stones at this time, and it is established that the hammer cannot be lifted with brute strength. Hela seems to be an exception because she had some personal connection to the hammer. Also, Thanos can't even lift the hammer in the comics, where he's even stronger.
So why didn't Thor (or Captain America) use this technique, which worked against Loki and the dragon?