The way time travel in the MCU works is that the past is unalterable. However, time travel creates a duplicate timeline which branches off. This means paradoxes are impossible. Travel between branches is allowed. A universe needs the infinity stones to work properly, so it is extremely rude and destructive to steal them, unless you put them back right away. The events of Endgame not only reversed the snap by wishing everyone back - it unexpectedly created an alternate timeline without a snap ever happening, because the Thanos from an alternate past was defeated in the original timeline, leaving his timeline free of his destruction. Double win!
Note, Hulk’s comments about time travel don't mention the stones being what causes a branch to form.
Hulk : And secondly, time doesn't work that way. Changing the past doesn't change the future.
Hulk : I don't know why everyone believes that, but that isn't true. Think about it. If you go into the past, that past becomes your future, and your former present becomes the past, which can't now be changed by your new future!
(note regarding the below - the time travel with new events creates a split - the removing of the stone is a big event - but the split already happens from the time travel and just being in the duplicate past. The Ancient One is concerned about her reality being messed up by the stones leaving)
"If I give up the Time Stone to help your reality I'm dooming my own."
"With all due respect, alright, I - I'm not sure the science really supports that."
"The Infinity Stones create what you experience as the flow of time. Remove one of the stones and that flow splits. Now this may benefit your reality, but my new one, not so much. In this new branch of reality, without our chief weapon against the forces of darkness, our world would be overrun, millions will suffer. So tell me doctor, can your science prevent all that?"
"No... we can erase it. Because once we're done with the stones, we can return each one to its own timeline at the moment it was taken, so chronologically, in that reality, it never left."
Edit: Adding more dialog from the exchange - there is no indication that this alternate timeline will cease to exist when the stone is returned. It is being returned because it would damage an entire alternate universe if not returned - which strikes me as rude. The Ancient Clearly understands that this Hulk is from a future (that is original) timeline and yet she remains concerned about maintaining the branch the discussion is taking place in. Again MCU time travel does not allow the past to be changed. Even just visiting and not doing anything major is a change.
"But you are leaving out the most important part. In order to return the stones, you have to survive."
"We will, I will. I promise."
"I can't risk this reality on a promise. It is the duty of the Sorcerer Supreme to protect the time stone."