If there was one major clue that Captain Marvel provided MCU fans with leading into Avengers: Endgame, it was the fact that the Tesseract, the glowing blue cube that holds the Space Stone inside of it, will likely play a major part in the upcoming film. After all, Captain Marvel gained her powers in the first place from blowing up a jet's engine that had the powers of the Space Stone in it — well, in Captain Marvel the movie at least. The Tesseract's timeline in the MCU started way before the most recently released film, though, and it's definitely worth looking back at while preparing to brave the packed theaters to see Endgame once it comes out on April 26.
Tracking the Tesseract gets a little tricky when you factor in the chronological order of every MCU film. Technically, Captain Marvel takes place in the '90s, so it's well before most of the movie's time settings. But there is another movie that takes place in the past, and that's Captain America: The First Avenger, which was the first movie that featured the Tesseract — aside from an Easter egg appearance of it in Iron Man 2.
In Captain America, the Tesseract first appears in 1942 when Nazi officer Johann Schmidt steals it from a German-occupied town in Norway. As for how it got to Norway, that can likely be explained by a later divulgence from Schmidt's villainous identity, the Red Skull, who says that the Tesseract started out in Asgard, calling it "the jewel of Odin's treasure room." As Nerdist suggests, one can presume that at some point in time the Norse god decided to store the Tesseract in a tomb in Norway for reasons unbeknownst to us mortals. While it's unclear what happened with the Tesseract before 1942, it's certain that afterwards the Red Skull planned to use its power to build indestructible, weapons of mass destruction to destroy the U.S. and change the world.
Towards the end of The First Avenger, Captain America (Chris Evans), hijacks the Red Skull's plane, leading the villain to open the glowing cube and disappears into a wormhole. That was the first clue that the Tesseract held the Space Stone, which allows you to travel across the galaxy in an instant, within it. With Cap left on the aircraft, the dutiful hero flies the plane into the Arctic in order to prevent the powerful weapons from causing mass destruction. Before that, however, the Tesseract falls into the ocean from the plane, and Howard Stark recovers it from the bottom of the sea.
Next in the Tesseracts history is its role in Captain Marvel, when it is revealed that Mar-Vell (Annette Bening) had directed Project P.E.G.A.S.U.S., and secretly used the resource to power a faster-than-light engine that could help the Skrulls (which became refugees of the Kree-Skrull War). How did Mar-Vell get ahold of the Tesseract? The MCU Wiki explains that after Stark found the glowing object at the bottom of the ocean, he created Project P.E.G.A.S.U.S. along with S.H.I.E.L.D., NASA and the United States Air Force, in order to study and harness the Tesseract's energy in the mid 1940s.
Between the '40s and the '90s, as you see in Captain Marvel, the Tesseract was either on Earth or on the hidden planet where Mar-Vell kept the resource while helping the refugees. In order to get to the planet, Mar-Vell used the Tesseract-powered faster-than-light engine in her jet, which explains why Captain Marvel gained powers during the engine's explosion.
Towards the end of Captain Marvel, you see Captain Marvel and S.H.I.E.L.D. agent Nick Fury (Samuel L. Jackson) bring the Tesseract back to earth by using the Flerken, Goose, to securely hide the valuable object. So now it's clear that the Tesseract was on earth in the '90s after the events that followed Captain Marvel, and it likely stayed in Project P.E.G.A.S.U.S.'s possession until 2012's Avengers came out — which was set in current time.
As Vox points out, though, Fury returns in the post-credit scene following 2011's Thor to discuss the Tesseract. In that scene, Fury asks Thor's Dr. Selvig (Stellan Skarsgård) to research the glowing cube in a secret lab. That moment reveals when Loki (Tom Hiddleston) learned of the Tesseract's location, which then plays out in The Avengers.
Perhaps the MCU film that most focuses on the Tesseract is 2012's The Avengers, which starts off showing Dr. Selvig leading a team to study the Tesseract — for P.E.G.A.S.U.S. — when Loki creates a wormhole and appears in the lab, stealing the Tesseract and incapacitating Selvig and the other agents. Loki gets away, but he's later captured by Steve Rogers, Tony Stark (Robert Downey Jr), and Natasha Romanoff (Scarlett Johansson). Later, Loki escapes and uses the Tesseract to create a wormhole in New York which allows an army of aliens called Chitauri to invade the city. Following the eventful Battle of New York, Thor returns Loki and the Tesseract to Asgard.
In Infinity War, following the destruction of Asgard in Thor: Ragnarok, Thanos (Josh Brolin) intercepts the getaway ship that the Asgardians had boarded to escape. Loki reveals that he has the Tesseract which Thanos demands, and he gives it to the powerful villain in order to save Thor. Thanos ends up killing Loki after getting the Space Stone — from inside the Tesseract — and he continues on his mission to collect the others.
Between the significance of Project P.E.G.A.S.U.S. and Loki's great sacrifice to save Thor's life in Infinity War, the Space Stone clearly had a great impact on the MCU up to this point. It will be interesting to see how it shows up again, if at all, in Endgame.