The biggest mistake Kevin Feige ever made was letting Captain America stans direct and write Avenger movies. They have shall we say issues with the other two members of the big two (and they cannot write women worth a damn-that is why they sacrificed Natasha and Gamora to the soul stones.) Not sure why they have issues with the other two superheros who have a trilogy but they do-they give Thor humiliating writing and Tony cruel writing.
Thor's depression is turned into a punch line (because he eats his feelings haha so funny-not). The only time it is not used as a punch line is when Tony wants Bruce rather than Thor to use the stones to bring everyone back and it is fairly clear he is concerned that Thor wants to use them because Thor is suicidal. Stans of characters who are not Thor love having their fav wield Thor's hammer but usually they come up with a narrative reason why it is necessary but these writers and directors are such big Steve stans they could not be bothered to do even that.
The treatment of poor Tony ties with the bad writing for Natasha because death is the worst. Poor characterization is annoying, dying a horrible painful death is traumatizing and not something you can come back from. Of course they could have made him alive again with bullshit timetravel etc etc but they chose not to. Instead they chose to have Steve get to have a redo of his alleged sacrifice right after the funeral. That was an absolute slap in the face-Steve gets happiness, Tony gets to die. And not only could they have brought him back easily, again they almost won in Infinity War. They clearly explicitly would have beaten Thanos if Thor had aimed for the head. They clearly explicitly would have beaten Thanos if Peter Quill had kept his cool as well though this is not mentioned in Endgame and the directors and writers blame Thor rather than Peter for the loss anyway. There was no need for Tony to die, except that the writers and directors wanted him and his stans to be in pain and the only way was to have him use the stones. (There were many ways to beat Thanos! The "only way" Strange was referring to was the only way Tony could potentially actually die.)
Cap stans may whine that Steve is selfish-and he is-but he gets rewarded for it. He is "worthy" enough to wield Thor's hammer and "worthy" of a long, happy life with Peggy. He gets to make speeches about sacrifice and moving on without sacrificing or moving on.
And another thing! Thanos gets a big scene full of pathos at the end of Infinity War with a traumatized young Gamora where he gets to be emo about murdering his daughter in order to mass murder the universe whereas Tony's daughter gets a scene where she is chipper (?) when Happy tells her what food her dad likes as if she has already forgotten even though he literally just died. (I know that there was a scene where Tony and Morgan talk but it was cut so it doesn't count. Funny how all the fat jokes made the cut but an actually important scene didn't.)