In the Marvel Cinematic Universe (MCU), the locations of the Infinity Stones are as follows:
Space Stone (Tesseract): It was first seen in "Captain America: The First Avenger" and was later acquired by S.H.I.E.L.D. It was stored in their headquarters, but in "The Avengers," Loki stole it and used it to open a portal. It eventually came into the possession of Thor and was last seen aboard Thor's ship, the Statesman, in "Thor: Ragnarok."
Mind Stone: It was housed in the Scepter used by Loki in "The Avengers." It was later revealed to be in the possession of Hydra and S.H.I.E.L.D. In "Avengers: Age of Ultron," the Avengers retrieved the Scepter, and the Mind Stone was eventually incorporated into Vision's forehead. Vision had the Mind Stone until "Avengers: Infinity War," where it was forcibly removed by Thanos, resulting in Vision's death.
Reality Stone (Aether): It first appeared in "Thor: The Dark World" and was initially in the possession of the Dark Elf Malekith. It was later collected by the Asgardians and given to the Collector for safekeeping. However, in "Avengers: Infinity War," the Collector's collection was destroyed, and Thanos obtained the Reality Stone.
Power Stone (Orb): It was featured in "Guardians of the Galaxy." Star-Lord and the Guardians of the Galaxy obtained it, but eventually, it fell into the hands of the Nova Corps for safekeeping on Xandar. However, in "Avengers: Infinity War," Thanos attacked Xandar and acquired the Power Stone.
Time Stone (Eye of Agamotto): It was introduced in "Doctor Strange" and was protected by the Masters of the Mystic Arts in Kamar-Taj. Doctor Strange became its guardian and used it to manipulate time. However, in "Avengers: Infinity War," Doctor Strange willingly gave the Time Stone to Thanos to spare Tony Stark's life.
Soul Stone: Its location was not revealed until "Avengers: Infinity War." Thanos discovered that the Soul Stone required a sacrifice to obtain it. He obtained it on the planet Vormir by sacrificing his adopted daughter, Gamora.