I don't think the comparison of Ant-Man and Captain Marvel is fair.
Ant-Man was the coda of Phase 2, and came after Avengers: Age of Ultron. This is important for two reasons. One there were no hanging plot threads from Ultron left. Two, Ultron got a somewhat mixed response. Hence the relatively low box office for Ant-Man (which was also designed as a smaller-scale, lower-budget origin film) made sense.
Captain Marvel, in contrast, came not after Endgame, but between Infinity War and Endgame. It was not the coda to Phase 3 (that was Spider-Man: Far From Home). Infinity War ended on a cliffhanger, and hinted that Captain Marvel would be important for Endgame (which, by that point, came out nearly a year before). So I think it's fair to conclude in retrospect some people turned out because they were really chomping at the bit for more Avengers.
Add to this that some of the marketing hinted the movie would help develop Nick Fury, and I think a fair number of people didn't show up specifically for Carol. Or may have showed up to check out Carol, but decided, four years later, they just didn't care all that much.
Iron Man 3 came out right after Avengers and made a billion earning about 600m more than IM2 (which was famously hated).
Ant-man and the Wasp came out in between the two Avengers movies, just like Captain Marvel. It didn't make a billion. More than that, it made 500m less than Captain Marvel. Hell, it made less than Iron Man 2.
Thor Ragnarok came out five months before Infinity War and was the kick-off for the whole Infinity War event. It didn't make a billion.
Spider-man Far from Home came out right after Endgame and was advertised as the coda to the whole infinity saga. It did make a billion but only about 250m more than Homecoming.
There is not and never has been any even remotely logical argument that the 'Avengers bump' could ever possibly account for the entire billion dollar gross of Captain Marvel. At worst, it would still have been in the same territory as Ant-man. More likely it was still in the same territory as such 'unsuccessful' movies as Winter Soldier or Ragnarok.