After Thanos wipes out half of all life, the remaining Avengers travel back in time to collect the Infinity Stones and undo the destruction. They succeed, but a past version of Thanos attacks. In the final battle, Iron Man sacrifices himself to defeat Thanos and save the universe.