The Theft of the Time Stone was a plan executed by the Avengers as a part of their Time Heist. Hulk was sent to steal the Stone from Doctor Strange at the New York Sanctum. However, he was unaware that the Battle of New York predated Strange's tenure as Master and that the Sorcerer Supreme at this time was the Ancient One.
The Ancient One initially refused to relinquish the stone, citing that the Masters of the Mystic Arts would need the Time Stone to defend themselves in the future, although she relented after discovering that Strange had intentionally given up the Time Stone to Thanos and realized he had a reason for doing so.
Upon arriving at the New York Sanctum, Hulk was instead met by the Ancient One, who informed Hulk that Strange was not yet a Master of the Mystic Arts and would not join them for five years, telling him that Strange was still currently a neurosurgeon. Hulk implored the Ancient One to relinquish Time Stone to him, notifying her of the Snap that Thanos caused in the future.
But the Ancient One refused, citing that she could not give him the Time Stone to alter his timeline and leave hers undefended, despite Hulk promising that he would return the stone to her at the exact moment it was taken. The Ancient One proclaimed that all the Masters of the Mystic Arts have sworn an oath to guard the Time Stone as their chief weapon. But Banner, not wanting to give up, asks her why Strange had willingly relinquished the Time Stone to the Mad Titan. She is then shocked realizing that Strange would only have given up the stone to Thanos for a good reason, the Ancient One decided to trust in her future successor, handing over the Time Stone to Hulk.
After returning to 2023, the Time Stone was placed within the Nano Gauntlet, created by Tony Stark, Hulk and Rocket Raccoon. Following the Battle of Earth, the Time Stone was placed in a suitcase and given to Steve Rogers, who traveled back in time once again to return the stone. By returning the Time Stone to the Ancient One, the Avengers prevented that alternate timeline from being unable to defend itself from Kaecilius and Dormammu.