8They both have a savior complex
It's a natural thing for Tony Stark to have a savior complex. He is a superhero after all, but that characteristic is even more pronounced in Tony than in the other Avengers. Captain America and the other heroes believe in pooling their resources together to fight a threat. But Tony
is convinced that even among the other heroes, he is the cleverest and wisest, and thus he feels a responsibility to save not only the world but the other heroes as well. That was the main reason why Tony created Ultron in Age of Ultron. He wanted to invent something that kept the world safe and did not even bother consulting the other heroes because he was convinced he alone knew what was best for world safety.
Similarly, Thanos possesses a savior complex that has convinced him that he and he alone recognizes the danger of overpopulation across the universe, and he alone possesses a working solution: eliminate half of all life. Just like with Tony and Ultron, when other people try to convince Thanos that his method is wrong, he ignores their warnings and is utterly convinced that he alone has the wisdom to see that his way is the right way and the only way to save everyone.