The search for the Infinity Stones is probably the closest thing to a major, overarching plot the Marvel Cinematic Universe has. The physical representations of the foundational elements of existence created during the Big Bang, each stone possesses incredible power. While the six stones don't appear in every film, they've appeared at the center of multiple entries in the franchise and are at the core of Avengers: Infinity War and the upcoming Avengers: Endgame.
But where were they before Thanos managed to collect them? Look back at the history of the Infinity Stones, as CBR charts their locations across the timeline of the MCU -- or at least, what we know so far.
The Space Stone wasn't initially identified as such. Instead, it was introduced as the Tesseract, first found during World War II hidden behind a mural of the Asgardian world tree (hinting that Asgardians played a role in hiding it on Earth). It was stolen by Red Skull and given to Hydra scientist Armin Zola, but Hydra lost the Space Stone when Red Skull was seemingly disintegrated and Captain America crashed the plane carrying it into the ocean. Howard Stark recovered the stone, and it ended up with the NASA/USAF joint Project Pegasus. The project, led by Dr. Wendy Lawson (secretly Mar-Vell of the Kree,) studied the Space Stone, using it to develop engines for space travel.
After Lawson's death, Carol Danvers destroyed the engine powered by those energies, which resulted in her receiving her powers. The stone was rediscovered by Captain Marvel and protected from the Kree before ending up back with S.H.I.E.L.D. Project Pegasus resumed experimentation until Loki stole the Space Stone in The Avengers and used it to open a portal for the Chituari invasion. Taken by the Asgardians in the aftermath of the battle, the Space Stone remained in Asgard until its destruction in Thor: Ragnarok. Thanos took the stone from Loki in Infinity War.
Like the Power Stone, the Reality Stone (or Aether, as it is known to the Asgardians and their enemies the Dark Eleves) was used for great destruction before being hidden away. Thousands of years ago, the Dark Eleves tried to use the stone to destroy existence, but were defeated by the Asgardians. Sealed away by Odin's father Bor after forcing the Dark Elves into retreat, the Aether remained hidden for literal ages.
But when the Convergence opened up the walls between worlds during Thor: The Dark World, Jane Foster accidentally interacted with the Aether and bonded with it. Doing so threatened Jane's life and made her a target of the Dark Elves, who eventually dragged the power out of her and fused it to their leader, Malekith.
But before Malekith could use the Reality Stone to destroy the universe, Thor and his allies were able to stop him and separate him from it. Fearful of keeping it too close to the Tesseract (reasoning that having two Infinity Stones in the same place was asking for trouble,) the Asgardians gave the Aether to the Collector. It remained there until Thanos attacked Knowhere and took it from him.
The Power Stone was introduced in Guardians of the Galaxy. As revealed by the Collector, the stone was previously in the possession of the Celestials, who used it to wipe out entire planets. Others tried to harness the Power Stone but failed to contain the energies. Eventually, the stone ended up hidden on the dead planet known as Morag, inside a nondescript orb within a hidden tomb. Thanos recruited Ronan to recover the stone, but his men were unable to claim the stone before Star-Lord and the Ravagers were hired to steal it. Star-Lord made off with the stone, setting off the events of Guardians of the Galaxy.
The group tried to sell the orb to the Collector, but when one of his servants tried to use it to strike back at her master, she was destroyed by the overwhelming power. Ronan took it and tried to use the stone to destroy the Nova Corps home world of Xandar, but the Guardians were able to band together and control the Power Stone, killing Ronan and saving the day. The Guardians entrusted the stone to the Nova Corps... who were promptly wiped out off-screen by Thanos when he attacked Xandar for the Infinity Stone.