Not sure if this is late but Tim Pool posted a video about
Captain Marvel and her role in
Endgame that showed some leaks behind the scenes. The leaks he got were from a Reddit user,
Apparently the script for
Endgame had massive rewrites because the Russo brothers and the writers for
Infinity War didn't want her in the movie because they wanted to ended with the original characters. However, Disney and Marvel forced them to include Captain Marvel in
Infinity War, which the Russos refused. So Disney and Marvel agreed to the Russos that Captain Marvel didn't appear in
Infinity War but had to be in
Endgame.
Also,
Endgame's budget apparently went up so they had to cut some of Brie Larson's action scenes out and replaced them with Captain America and Black Window in order to save costs. However, Larson threw a temper tantrum about it and Marvel filmed those scenes anyway.