In Avengers: Endgame we see Thor make an attempt at getting the Gauntlet but as Thanos grabs his cape he forsakes it and starts attacking Thanos. Why did he just allow Thanos to tear his cape as in Thor: Ragnarok and go for the Gauntlet? He was clearly very close and had he let Thanos tear his cape he most definitely would have taken the Gauntlet.
Assuming you mean this scene at the end where they are all struggling over the Infinity Gauntlet and to not let Thanos grab it:
Well quite easily because Thanos actually grabs his neck and pulled him backwards. Thor did the sensible thing and turn to face and fight his opponent instead of taking a hit in the back.