“There’s a WILD fan theory that claims Tony Stark is actually a full-fledged member of Hydra:
He helped make the Helicarriers during Winter Soldier. He invented a robot (Ultron) that was deliberately flawed so that the government would want to put the superheroes in check. He supported the Sokovia accords, which stripped enhanced people of civil rights. He tried to kill Bucky because he realized that Bucky was getting his memory back and could ID him as Hydra. When Thanos’ people came for the Infinity Stones, he deliberately didn’t call Steve Rogers for help because he wanted the Avengers to lose.
Because Doctor Strange realized what Tony was via his powers, he deliberately convinced Tony to kill himself at the end of Endgame.”