The writers of Avengers: Endgame have explained why Captain Marvel only had a limited role in the movie.
According to Markus, the Captain Marvel character proved problematic for various reasons. “She was always going to be in it but we didn’t have much to go on,” he said. “They had cast her and that was it. It is a tough balance to strike when you have a character that powerful who you’re going to bring in, and you don’t want it to seem like, well we just brought in this person who can clean the house that we couldn’t clean in the previous movie.
“We had to decide on a balance between not making it feel like a cameo but not having her around so much that she solved all of the problems for everybody.”
McFeely also pointed out that Captain Marvel’s powers had the potential to fix all of the problems in the movie, and the purpose of the story was to focus on the original members of the team.
“The point of the second movie was saying goodbye to the original six Avengers, so their stories were gonna be way up here… It was not fair to the other six Avengers to have Captain Marvel come in and solve all their problems, it didn’t seem like good storytelling.”