It's not a Marvel movie until there is a Stan Lee. However, those cameos now have entirely different meanings now that Lee has passed away. The first was his cameo in Spider-Man: Into the Spider-Verse which was somehow heartbreaking and uplifting. Now we have Captain Marvel and this one is also a little heartbreaking to see on screen. However, directors Anna Boden and Ryan Fleck did decide to change the scene a little after Lee's passing as they explained to Mashable. This could be considered minor spoilers if you don't want to have Lee's cameo spoiled for you.
In the movie Vers (aka Captain Marvel) is chasing a Skrull while on a train. We've seen parts of this scene during the trailers. Vers looks at a man reading a script for Mallrats and pushes it down to reveal Lee. He is practicing his lines for his role in the movie. Vers gives him a little smile and walks away.
"Instead of just the pure laugh we had, we had a little bit of a smile from Captain Marvel in response to it, and she kind of breaks character for a moment," Boden told me during an interview in Los Angeles last month. "I think it reflects a little bit of what the audience is feeling, and we allowed that to happen."
That isn't the only cameo that Lee has. At the beginning of the movie, there is the Marvel logo with the flashes of the various Marvel heroes. This time that logo was filled with various cameos and behind-the-scenes footage of Lee. Fleck and Boden didn't have anything to do with that but they were on board when they heard about it.
"The Marvel logo was a Marvel thing that they presented to us," Fleck explained. "They said, 'Hey guys, what do you think of this? We were thinking of doing this for the movie.' And we were just like –"
"Loved. We cried," Boden recalled.
"We were just moved by it," Fleck added.
Boden and Fleck didn't get to spend a lot of time with Lee but they were both extremely grateful that they got the chance to work with him.
"We feel really lucky to have gotten the opportunity to meet him, and have that special moment on set," Boden said. "There's so much reverence when he comes around, and he brings so much life and respect there with him."
We can expect to see another Lee cameo in Avengers: Endgame which will be released next month.
Summary: Carol Danvers becomes one of the universe's most powerful heroes when Earth is caught in the middle of a galactic war between two alien races.
Captain Marvel, directed by Anna Boden and Ryan Fleck, will also star Brie Larson, Jude Law, Gemma Chan, Djimon Hounsou, Lee Pace, Lashana Lynch, Samuel L. Jackson. The film is set for release on March 8th, 2019.