Spoilers ahead! Plot points are revealed here, I'll put the deeper plot points in spoiler boxes.
Time travel features heavily in the plot of Endgame. Correct me if I'm wrong, but the MCU seems to subscribe to the many-worlds interpretation of quantum mechanics. This makes any alterations to the past fine, and the "present" people making those changes return to the future they left from unaffected.
So, the plan is:
pop into the past to gather the Infinity Stones, wield them to perform a reverse snap, then pop them right back where you found them as if they'd never left at all.
This plan succeeds. However, as a result,
the pre-snap Thanos journeys into the future to protect the job he has yet to do, and is defeated in the process. This means that, although the Stones are placed back in their respective times (the Cap's last job before retiring), there's now a universe short of Thanos.
So, my question: is there now a universe out there in which the snap never occurred as well as several of the Avenger's adventures (anything after 2014, I think that's where Thanos travelled from), while at the same time there is a universe (the one we see in the films) in which all of the events of the MCU films transpired?
A further point, we're told that traveling back to kill a baby Thanos wouldn't work because they'd still be in the timeline they left from upon return (the snap one), while the other timeline would exist to no benefit of their own. This is why the mission was never about killing a pre-snap Thanos - your own past is unchangeable, the snap is locked in. Therefore, the Thanos that travelled to 2023 is forever locked in to travelling to that point and being defeated, meaning the time he came from must no longer have him.
This could also explain how the universe that we watch through the movies has a Gamora now. Because she came from a timeline in which Thanos never sacrifices her, she can be alive (remember, we're told that there's no way to reverse the sacrifice made to retrieve the Soul Stone - the only way she can be alive is if she's from a universe where she was never sacrificed (i.e. no Thanos after 2014)).