IMO the Skrulls introduction was pretty much ruined from the get-go in Capt. Marvel. We had what could've been the perfect introduction for a Secret Invasion sub-plot that could've ran through most of Phase 4, it actually started off ok: Skrull shapeshifters are running amok through the US Govt. You don't know who you can trust, Skrulls could be anyone. Then they went and "resolved" the issue and turned Skrulls into good guys for the sake of "shattering expectations".
What they should have done was just not resolved that thread at all. Maybe they get some higher-up Skrull and take them out, but, with his dying breath... "This is not over... the Invasion... has only begun..." They needed to leave that menacing tone of the Skrulls intact after that movie. We've had Skrull cameos throughout Phase 4, Ben Mendelsohn has been showing up all over the place, but the tone was always these friendly offeat cameos, "Oh look, it's the shapeshifting alien talking about boring things, how funny, he's just like us!" Like he was in some sort of buddy cop show or something. NO. They should've kept the threat alive, slowly revealed other people being taken over or being revealed as Skrulls, kept that part about Secret Invasion alive where you didn't know who was who.
It would've been odd to reveal that sandwiched in between Infinity War and Endgame, but Capt. Marvel was always going to be a weird movie anyways, especially since it had almost nothing to do with Infinity War anyways. At least this way they could've introduced the next threat to follow the Infinity Saga and maybe given Phase 4 some sort of direction.
Secret Invasion should've been the culmination of a story that had already been ongoing, this plotline shouldn't have been introduced during Secret Invasion and basically having to go back on the previous direction of making Skrulls the "reformed good guys".