Any great final scene of a movie serves both the text and subtext of the story; that is to say, it resolves the plot while also defining the themes of what the audience just watched. Viewing the films of the Marvel Cinematic Universe through this prism might be seen as overthinking superhero blockbusters that serve primarily to entertain the masses.

RELATED: The 5 Best (And 5 Worst) Marvel Movies, According To Rotten Tomatoes

However, while Martin Scorsese is right about some Marvel movies (and a lot of other big-budget blockbusters) that they don’t challenge the audience or make an emotional connection, some of the MCU’s offerings are truly great, and so are some of their endings.

Best: Iron Man

Tony Stark reveals he is Iron Man in a press conference in Iron Man

In the script for Iron Man, Tony Stark went out in front of the press conference and stuck to the story cooked up by S.H.I.E.L.D. that the armor-clad superhero was actually his bodyguard.

However, Robert Downey, Jr. improvised an alternate ending that turned out to be both more in character for Tony and more exciting for the audience as he scrapped S.H.I.E.L.D.’s cue card and said, “I am Iron Man.”

Worst: Iron Man 2

Tony Stark being denied for the Avengers in Iron Man 2

The actual final scene of Iron Man 2 is pretty funny, as Senator Stern begrudgingly gives medals for heroism to Tony and Rhodey, but the ending of the movie exemplifies what’s wrong with the work as a whole — that it focuses more on setting up a larger franchise than telling its own story, the same mistake later made by the DCEU’s Batman v Superman.

Right before the medal-giving scene, Nick Fury introduces Tony to the Avengers Initiative, surrounded by maps full of Easter eggs, setting up various future movies.

Best: Avengers: Age Of Ultron

Age of Ultron Ending

Marvel fans had to wait a long time to hear Captain America say the words, “Avengers, assemble!” He didn’t say it until Avengers: Endgame, when dozens of heroes emerged from Doctor Strange’s portals to help him take on Thanos’ armies, and it was well worth the wait.

During that wait, fans got a delightful teaser in the final moments of Avengers: Age of Ultron. As Cap and Black Widow get ready to train the new Avengers recruits, Cap says, “Avengers, a--” and then he’s cut off by an abrupt cut to the end credits.

Worst: Doctor Strange

Aside from its mind-boggling visual effects, Doctor Strange is one of the most by-the-numbers entries in the MCU, going for the safe option at every turn and hitting all the familiar beats of a superhero origin story.

RELATED: Doctor Strange 2: 5 Things It Needs To Improve From The First One (& 5 It Should Keep The Same)

At the end of the movie, after Strange has defeated the bad guy, he takes up residence at New York’s Sanctum Sanctorum, the last of several predictable turns in the story.

Best: Guardians Of The Galaxy Vol. 2

Guardians of the Galaxy 2 Ending

On the whole, the first Guardians of the Galaxy movie is stronger than the second. It has a tighter script, a more exciting adventure plot, and it’s truer to the characters. But Vol. 2 has a better ending.

As the Guardians hold a funeral service for Yondu, the Ravagers show up to honor their fallen comrade, whose sacrificial death has redeemed him in their eyes. If that situation alone doesn’t elicit tears, then the sounds of Cat Stevens’ “Father and Son” will do it.

Worst: Captain Marvel

While Captain Marvel is, all things considered, one of the MCU’s most inventive origin movies, its ending really feels out of place. It doesn’t fit in with the character developed throughout the film.

Carol doesn’t seem like she would just abandon Monica and Maria for two decades to fight intergalactic crime, but she had to do that at the end of the movie to explain why she’s only just showing up in the wider MCU.

Best: Captain America: The First Avenger

Captain America First Avenger Ending

The original plan for Captain America’s first MCU solo movie was to have the first half of the movie set during World War II and the second half set during the present day, but it was a much smarter move to make the whole movie as a pulpy WWII adventure with the present-day awakening saved for a final scene twist.

RELATED: Captain America: 5 Reasons The Winter Soldier Is His Best Solo Movie (& 5 Why It's Civil War)

Following his triumphant suicidal sacrifice, Steve Rogers wakes up in a 1940s-style hospital room and realizes something’s not right because he attended the baseball game being reported on the radio. He runs out of the building and finds himself in present-day Times Square. The only thing that’s on his mind when Nick Fury approaches him is that he missed his date with Peggy.

Worst: The Incredible Hulk

The ending of The Incredible Hulk sets up a franchise that never happened, as Bruce Banner goes off the grid to live in British Columbia and makes a controlled transformation into the Hulk with a knowing smile.

It feels out of place with his character arc within the movie, serving only to set up a sequel that never got made, and it doesn’t even line up with where Mark Ruffalo’s Banner found himself four years later in The Avengers.

Best: Avengers: Infinity War

Thanos snaps his fingers in front of Thor in Avengers Infinity War

After two Avengers movies, it became clear that whatever threat Earth’s Mightiest Heroes faced, they’d defeat it within the runtime and be back to normal in time for another wave of solo movies. The expectation that, like Scorsese says, Marvel movies have nothing at stake, is what made Avengers: Infinity War’s ending so impactful. Thanos spent the movie saying he wanted to collect all six Infinity Stones and then snap his fingers to wipe out half of all life in the universe. It just sounded like a crazy bad guy plan that would be thwarted before anyone had to discuss its merits and pitfalls.

But at the end of the movie, Thanos won. He snapped his fingers, the Avengers lost, and then he just disappeared and left the world’s superhero community to deal with their failure. This ending is often called a cliffhanger, but it is a definitive ending to the story; it just ended in the villain’s favor.

Worst: Thor: The Dark World

Thor kisses Jane in The Dark World

Often called the worst entry in the MCU, a more accurate description of Thor: The Dark World might be that it’s the kind of generic cookie-cutter blockbuster that the MCU’s detractors claim all of its movies are.

Alan Taylor’s movie gives viewers no reason to care about Malekith or the threat he poses, and the movie ends with Thor vanquishing the threat and getting the girl, just like anyone who's ever seen a movie before would expect. And the Loki twist is just tiresome.

NEXT: The 5 Best (& 5 Worst) Third-Act Battles In The MCU