I'm reading here and there about Brie Larson's desire for an "all-woman" MCU movie. Okay, sure, I'm game for that.
I was certainly aware of That Scene in
Endgame, and while I liked it well enough in the moment, it also felt very clumsy. If a writer's goal is to craft something contrived, it's important to make it
feel natural, part of the flow of the story. I looked up
A-Force, a comic I never read, and it seems the writer, G. Willow Wilson, didn't want to come up with a specific reason, which I can sort of understand. I mean, a group of men joining together to save everybody is never questioned as artificial. But she also didn't make it simple happenstance. According to Wikipedia, the all-women group of Avengers emerged from an alternate universe where women are in charge. Again, I haven't read it, but that sounds like the worst option, to me.
Contriving a reason for an all-women group of superheroes...
I remember an issue of
JLA that did this when I was a kid. I had to look it up to get the details, but basically an ancient villainess named Siren appeared, who had the power to magically hypnotize men, and only men. Batman, Superman, Green Arrow, The Flash. So it was left to Wonder Woman, Supergirl, Black Canary and Hawkwoman to save the day. Clunky as hell, but it was the late '70s and I was a little boy, so I thought it was awesome (alright, alright, I admit that being rescued by Wonder Woman, Supergirl, Black Canary and Hawkwoman doesn't sound so bad to me, even today

). For the MCU, you could introduce The Enchantress as the villain. Still clunky as hell, but that doesn't mean it couldn't work.
...but making it plausible happenstance:
I start my story with Valkyrie, somewhere in outer space. She gets in over her head with some mega-villain and goes looking for help. Her first instinct is to look for Thor, but she can't reach him. Luckily, there's another hero she's met who, if anything, is even stronger than Thor: The MCU's version of Superman, Carol Danvers. Carol already knows Monica Rambeau and is kind of her mentor in the whole superhero thing (Monica would have her powers already, maybe in
Captain Marvel 2?). Now we add some kind of super-science MacGuffin that Valkyrie took and the villain wants, and because Carol and Valkyrie aren't scientists, they bring it to Wakanda to have Shuri look at it. The MacGuffin opens a wormhole, pulling in Carol, Monica, Valkyrie, and Shuri, just because they all happen to be standing around the table while Shuri is tinkering with it. T'Challa and Okoye both dive madly across the room to grab the flailing young princess, but only Okoye is close enough and also gets pulled into the wormhole just before it snaps shut. Escapades follow. From this point, it can basically be just another Marvel movie, the fact that the heroes are all women wouldn't have to matter at all.