https://tvtropes.org/pmwiki/pmwiki.php/Main/MarySue !!!
Wow, a wish fulfillment for the author!
For me, Captain Marvel and Rey are pretty much the modern incarnation of a Mary Sue. (Rise of Skywalker trying to walk this crap back not withstanding). They are both so flat and without character. They do not truly have growth or character arcs.
Power by itself is not enough. Bruce Wayne is a billionaire off the bat. Superman and Thor are born with the power of literal g-ds! Even Wonder Woman, miracled into being by g-ds, has to grow and adapt to very alien surroundings and concepts.
Drama is born of conflict. (Helping explain why season 1 of Star Trek Next Gen was so weak. Rodenberry dreamt of a Universe where conflict had been eradicated). Rey and the Cap'n pretty much march through their movies non-plussed. DULL. To me, that is the modern definition of a Mary (or Gary) Sue/Stu.