In modern stories featuring mythological characters, there’s a recurring theme that deals with the idea of gods as both creator and created, these purely distilled embodiments of ideas that cannot change their nature. Humans can change but the gods are constant, and while you can see that theme in books like American Gods, it’s also prominent in recent comics about Thor and particularly Loki. If Loki is the god of trickery, then he’s the embodiment of that idea. No matter how much he might want to change, he can never stop being the mischief-making liar that he is at the core of his character.
Thor, as we know from Ragnarok, is the God of Thunder, who storms in with a bolt of lightning and the boom of his hammer, laying waste to his enemies. He’s a nearly effortlessly powerful warrior, and the entire arc of Ragnarok is devoted to the way he learns that that strength is an inherent part of his nature that comes from within, not from any of his magic weapons. It’s his defining feature. So what happens when it doesn’t work?
He is — or sees himself as — personally responsible for what happened. He failed to kill Thanos before he could snap, and when he finally did finish off the Mad Titan, it was too late to fix anything. For all his strength, he failed. So if that strength is within him and defines him, but it couldn’t save his father, his brother, Asgard, or the billions of lives lost in Infinity War, if literally avenging their deaths didn’t change anything, what’s the point? That’s the existential crisis Thor’s dealing with in Endgame: nihilism. He failed, so why try? Why do anything if nothing matters?