
Captain Marvel is the last film to drop before the Avengers: Endgame is out. While Captain Marvel tells the origin story of Carol Danvers’ Captain Marvel, the mid-credits and end-credits scenes give out major clues to upcoming Marvel adventure, Avengers: Endgame.
(Spoilers Ahead)
The mid-credits scene
In the mid-credits scene, we are shown the pager that was used by Nick Fury to contact Captain Marvel. Steve Rogers, Bruce Banner, James Rhodes and Natasha are stationed in a spacecraft and are discussing the last page sent by Fury before he vanished during Thanos’ decimation. It was during Avengers: Infinity War that Nick Fury and Maria Hill were reduced into ash.
As the remaining Avengers are discussing the pager, Captain Marvel appears and questions Natasha about Nick Fury’s whereabouts. The scene concludes that Captain Marvel is unaware of the havoc wreaked by Thanos.

This scene perfectly sets up the upcoming events in Avengers: Endgame.
Tony Stark and Thor are not present here. While Stark has already been shown floating in his spacecraft, Thor’s whereabouts are still unknown.
The end-credits scene
Nick Fury’s bond with Goose is one of the highlights of Captain Marvel. Goose is a flerken who looks like a cat and her abilities include swallowing up humans. Dr Lawson aka Mar-Vell had the Tesseract in her possession as she was working on the light speed spacecraft but its location has been unknown since her death. Captain Marvel teams up with Talos, Fury and Maria to find it so she can protect the Skrulls against the Kree.

During the climax, the Kree and Skulls fight against each other for the Tesseract with Captain Marvel fighting for the Skrull side as she now knows the intentions of Yon-Rogg (Jude Law). Amid the climax sequence, Goose gulps the Tesseract and keeps it safe. Before Carol leaves, she tells Fury to keep this energy core on Earth. Upon Nick Fury and Goose’s return to Earth, Coulson and other S.H.I.E.L.D agents are still looking for the Tesseract but Fury knows the exact location.
In the end-credits scene, Goose is seen wandering on Nick Fury’s work desk, all alone. She then vomits out the Tesseract on Fury’s desk.
This ties up to The Avengers (2012) where S.H.I.E.L.D. is already in possession of the Tesseract.
Chronologically, Tesseract first appeared in Captain America: The First Avenger. So, this sighting counts as its second appearance.