Screenwriter Stephen McFeely touches on the issue in this New York Times interview, answering a question about deciding where in the two movies major events would happen:
Another big plot point is when everyone comes back. So the question
is, is it early in the second movie? Late in the second movie? You
notice the players left on the board are the O.G. Avengers [Captain
America, Iron Man, Thor, the Hulk, Black Widow and Hawkeye], and let’s
give them their due. It meant that we were likely going to bring
people back late. So that if you were a big fan of Doctor Strange or
Black Panther or Bucky [the Winter Soldier] or Sam [the Falcon],
you’re only going to get a little brief window on them. It can’t be
all things to all people.
And later answering a question about Captain Marvel's role:
Certainly, Captain Marvel is in [“Endgame”] a little less than you
would have thought. But that’s not the story we’re trying to tell —
it’s the original Avengers dealing with loss and coming to a
conclusion, and she’s the new, fresh blood.
The newer members of the team whose powers could conceivably win the battle almost single-handedly -- Dr. Strange, Scarlet Witch, Captain Marvel -- weren't supposed to overshadow the original Avengers.
But Dr. Strange has played a key role:
- He foresees the one future in which the Avengers win and arranges for that future to happen.
- He gathers all the allies for the final battle (as TheLethalCarrot noted)
- He holds back the water (as Gustavo Gabriel noted)
- He holds up his finger to signal Tony Stark that this is the "one" path that leads to victory (as TheLethalCarrot noted)
Stark: Hey. You said one out of 14 million, we win, yeah? Tell me this is it.
Strange: If I tell you what happens, it won't happen.
"What happens" being that Tony must sacrifice himself by using the Infinity Stones.