After 10 years of storytelling and world-building, the MCU has become the epitome of franchise filmmaking, and there’s some pretty genius foreshadowing in the Marvel Cinematic Universe that helped get to this point. Even when Iron Man first hit theaters in 2008 and Marvel Studios barely had an idea of how large their franchise would become, they were dropping hints about a bigger universe. From that film on, every addition to the MCU continued to push toward a boiling point, and that happened in Avengers: Infinity War.
Marvel Studios hid clues about Infinity War in plain sight for more than a decade, and although most of them were caught by obsessive fans, there were still plenty of surprises left. The Infinity Stones themselves were teased, introduced, and explained across multiple films, and Thanos made several cameos before taking a lead role. Not all foreshadowing was quite so obvious, however. Even seemingly innocuous lines of dialogue throughout the MCU pointed towards the destiny that would one day arrive.
The Marvel Cinematic Universe began with Iron Man in 2008, 10 years before the release of Infinity War, but that wasn’t too early to start dropping hints. During a scene in which Tony Stark is lamenting his suit’s high-altitude icing problems, his AI J.A.R.V.I.S. responds with, “A very astute observation, sir. Perhaps, if you intend to visit other planets, we should improve the exosystems.” A decade later, Stark followed his AI's suggestions and was prepared to not just visit the distant planet Titan, but to also have the fight of his life there.
The first real reference to the Infinity Stones and the Mad Titan destined to wield them was a brief glimpse of the Infinity Gauntlet sitting in Asgard’s treasure room in Thor. The inclusion of the Gauntlet was seen as just an Easter egg at the time, but the specifics show that even in 2011, the MCU knew what they were building towards.
Fans thought the Gauntlet in Thor was actually a mistake, since the glove in the treasure room was for a right hand, and the comic book Infinity Gauntlet was always worn on the left hand. Hela cleared things up with a joke in Thor: Ragnarok by dismissing the right-handed treasure as a fake to her lackey Skurge.
The first Infinity Stone to make an appearance in the MCU was the Space Stone in Captain America: The First Avenger — although it was disguised as the Tesseract at the time. While the Red Skull and Arnim Zola knew of the Tesseract’s connection to Norse lore, they had no way of knowing its true cosmic origins. All they knew for sure was that the Tesseract was an item of supreme power. When the Red Skull tried to take that power with his own hand, he seemed to have been incinerated. In true comic book fashion though, no body meant no death, and the Red Skull was revealed as the Soul Stone's guardian in Infinity War.
Loki is the first major MCU character to encounter Thanos, an event that takes place sometime between Thor and The Avengers. Their interaction includes two Infinity Stones — the Space Stone Thanos wants Loki to retrieve, and the Mind Stone Thanos gives Loki to help accomplish his task. Thanos remains offscreen until the film’s post-credits scene, but his proxy, The Other, has an ominous conversation with Loki early in the movie in which he drops a threat that foreshadowed Loki’s demise in Infinity War.
The Other darkly informs Loki that, “If you fail, if the Tesseract is kept from us, there will be no realm, no barren moon, no crevice where he can't find you. You think you know pain? He will make you long for something as sweet as pain.” Loki does his best to keep the Tesseract from Thanos in Infinity War, and receives a painful death as a result.