Unlike everyone in the Avengers, Tony Stark has gained quite a reputation for being a troublemaker and a selfish person for a superhero. But whatever Stark might seem like on the surface he is not a selfish person and he has proven it from time to time.
These facts puts Tony Stark into a new light
Source = "Filmic Box"
As Nukes are headed towards the midtown manhattan Iron Man takes it upon himself to intercept that missile through the inter-dimensional portal and to the Queenship of the extra-terrestrials. Despite knowing that once the suit’s power is drained he will die and will keep floating in the dark and endless space as the Avengers shut the inter-dimensional portal.
Even though he is portrayed as a millionaire playboy but he is very loyal to his girlfriend Pepper Potts, that he proposes to in Spiderman: Homecoming.
Ultron was intended to relieve the Avengers from their duties of saving the world and retire in peace to be with their loved ones.
Just like he blew up his years of hard work in Iron Man 3 like fireworks, just to ensure his loved ones safety.
Stark holds himself accountable for everything that has happened to the people around him, even though it is not the repercussions of his actions.