The Marvels’ Nia DaCosta directed that Ms. Marvel post-credits scene
MCU mastermind Kevin Feige arranged the finale's big cameo without letting anyone in on his plans

Iman Vellani in Ms. Marvel Image: Marvel Studios
As usual, the latest MCU entry, Ms. Marvel, ended with a post-credits scene that tantalizingly teased what’s to come from the character’s story. In another typical move, the folks actually involved with the series didn’t even fully understand what was going on until the very last minute. Classic Kevin Feige, masterminding his secret plans behind the scenes!
To recap (insert spoiler warning for anyone who hasn’t seen Ms. Marvel), the season ended with Kamala (Iman Vellani) noticing her bangle begin to glow. By the force of some power (Magic? Mutant? Clandestine? Other?), she’s abruptly transported from her bedroom in Jersey City and somehow replaced by Captain Marvel (Brie Larson) herself.