After Thanos snapped half the universe out of existence at the end of Infinity War, fans speculated about how - not if - the Avengers would bring everyone back. How could they without the Infinity Stones? In Avengers: Endgame, the Earth’s mightiest heroes travel back to different points on the MCU’s timeline to revisit some pivotal moments and swipe the Infinity Stones. The time heist in the middle of the movie is a lot of fun, but does the time travel in Avengers: Endgame actually work?
There are huge surprises in Endgame, with a surplus of characters showing up in unexpected places. Narrative twists are to be expected from a Marvel movie; however, in this case, they're facilitated primarily by time travel. This offers characters the chance to visit places - and times - typically reserved for fan fiction. Perhaps the weightiest of these twists comes toward the end when Steve Rogers not only travels back in time, but also stays there in order to marry the love of his life, Peggy Carter. It's a cathartic moment, but does it make sense? Assuming your brain hasn't melted trying to figure out the internal logic on your own, this look at Endgame's time travel rules should make for a handy guide.
Most of us, including Scott Lang and Rhodey, get our time travel knowledge from movies like Back to the Future and Timecop. In those movies, if you change something in the past, you also change the present. For instance, in Back to the Future, Marty McFly helps his dad be less of a dweeb in the 1950s. When Marty returns to the '80s, his family is living a nice upper-class life.
That's not how time travel works in the MCU. When Rhodey suggests offing Thanos as a child in order to undo the snap, Bruce Banner says, "I don’t know why everyone believes that, but that isn’t true. Think about it: If you travel to the past, that past becomes your future, and your former present becomes the past! Which can’t now be changed by your new future!"
When time-traveling in the MCU, the things you do in the past won't affect the present you return to. For instance, if Rhodey went into the past and punted a young Thanos into the closest sun, he wouldn't change anything about his present - the Snap still would have happened. However, his actions would create a parallel universe with no Thanos.
When Bruce Banner asks the Ancient One for a crack at the Time Stone, she explains that changing something in the past doesn't change the future. It does, however, create a universe where the timeline branches off. The actions of the Avengers in Endgame don't change their timeline, but they do create new parallel universes that begin at the moment of each alteration.
Think of it like this: If you go back in time and stop the hit on Kennedy, nothing in your original timeline changes; instead, there's simply a new timeline in which Kennedy survives his trip to Dallas. That universe will play out wildly different than your original version, which still exists sans JFK.
Many of the MCU's rules for time travel are a little contradictory, if not flat-out made up. Which is fine, by the way - the Russo brothers aren't advocating for the advancement of time travel technology; they're telling a story.
In simple terms, the Infinity Stones stabilize time itself. The Ancient One offers some elucidation, telling Bruce Banner that removing an Infinity Stone from the timeline interrupts the flow of time. However, the forces of good need the Infinity Stones to fight back against superhuman creatures like Dormammu.
If the Ancient One is to be believed - and she usually knows what she's talking about - removing the Infinity Stones from their point in the timeline not only makes that timeline more susceptible to the forces of evil, but creates a new reality. That's why Cap has to return the Stones to their original points on the timeline.
By going back and changing minor pieces of the MCU timeline, the Avengers have likely created a series of parallel universes. While they haven't done anything in their timeline - aside from saving the universe and offing Thanos twice - they have altered other timelines, for better or worse.
In their trip to 2012, the crew created at least two alternate realities. Loki is now alive and in possession of the Tesseract, and HYDRA either believes Cap is one of them, or she thinks they're going to jumpstart the events of Winter Soldier. Either way, 2012 is rendered completely different. It's also possible that Loki now exists in the current MCU timeline in spite of his supposed demise at the hands of Thanos in Infinity War.
There's no way to know whether these new realities will affect the current MCU timeline, but now that time travel is officially on the table, anything is possible.