Once The Ancient One learned from Bruce Banner that Doctor Strange had willingly given the Time Stone to Thanos in his timeline, she realized that he must have had a reason for doing so.
However, this scene between Hulk and The Ancient One in Avengers: Endgame ended the same way in the script that it did in the finalized product: with the latter giving the former the Time Stone.
And so, trusting a man that she wouldn’t officially meet for another half decade or so, Ancient One passed the Time Stone to Hulk.