Avengers: Endgame may have played with the timelines of the Marvel Cinematic Universe in a pretty intricate way - but that doesn't mean it could side-step all of the potential pitfalls of a time travel story. Endgame opened the door to an entire Marvel Cinematic Multiverse, but fans are still trying to wrap their heads about how some of the big changes of Endgame's "Time Heist" segment sync up with the rest of the MCU Infinity Saga. One thing fans still seem to be hung up on is Hulk's segment of the Time Heist and meeting with The Ancient One - which seems to create a major plothole for the Doctor Strange solo movie.
When Hulk (Mark Ruffalo) met The Ancient One (Tilda Swinton) in 2012 during Avengers' Battle of New York, the dialogue between creates a continuity error for Doctor Strange. The Ancient One doesn't want to give Bruce Banner the Time Stone as it is her duty as Sorceress Supreme to protect it at all costs. However, Banner changes The Ancient One's mind when he informs her that Doctor Strange voluntarily gave the Time Stone to Thanos (seen in Avengers: Infinity War). The Ancient One seems to know Doctor Strange's destiny, as she tells Banner that "Strange is meant to be the best of us," and based on that confidence in her future pupil, The Ancient One follows Strange's lead and relinquishes the Time Stone voluntarily.
The problem that Digital Spy (and many other fans) points out is that The Ancient One's faith in Stephen Strange during Avengers: Endgame doesn't match with her skepticism of him in Doctor Strange. When Stephen Strange comes to Kamar-Taj for The Ancient One's help, she refuses and makes him leave. It's Mordo (Chiwetel Ejiofor) who convinces The Ancient One to give Strange a chance (bet he regrets that now). The Ancient One and Mordo even have a scene together where they fight about the matter. It's clear that The Ancient One doesn't believe Strange is the future Sorcerer Supreme at that point - she thinks he's the next potential Kaecilius.
Now, there are of course a lot of counter-arguments to Endgame creating a plothole for Doctor Strange. You could say The Ancient One simply was playing her part in a cycle of events she knew had to take place; you could also argue that when Banner meets The Ancient One, the combination of the Time Stone and her other abilities give her the awareness she needs about Strange's role in the main MCU timeline. You could go deeper than that and argue about faith vs. skepticism, and how The Ancient One may have had moments of doubt in the 'prophecy of Strange.' After all, when she dies, she admits that she could only see the possibilities of Strange's future - meaning that she could see both the arrogant man who could become an evil sorcerer and the man who eventually became the MCU's greatest magical protector, who found the 1 way in 14 million to beat Thanos.
...In the end, the most likely answer is that Marvel Studios does a fantastic job with MCU continuity - but it ain't always perfect.
You can catch both Doctor Strange and Avengers: Endgame streaming on Disney+.