Avengers: Infinity War marks Thanos’ first big attack on the MCU, but this is far from his debut appearance in the franchise. The Mad Titan has turned up for three cameos prior to this movie, in The Avengers, Guardians of the Galaxy and Age of Ultron, respectively. While these teasing guest spots were fun, ideas change over time, which means that one of Thanos’ cameos really doesn’t gel with what we learn about him in Infinity War.
Think back to the post-credits scene of Ultron. After previous stooges such as Loki and Ronan had failed to bring him any Infinity Stones, Thanos dons his Infinity Gauntlet for the first time and growls: “Fine… I’ll do it myself.” This was a cool scene that set up his later attack in Infinity War, but it does raise the question of what he’s been doing for the past three years. What’s more, it just plain doesn’t make sense with the origin story of the Gauntlet.
When Thor, Rocket and Groot travel to the dwarf kingdom of Nidavellir in Infinity War, they discover that Eitri, the king of the dwarves, is the only one left after Thanos attacked the realm and got Eitri to forge him a weapon that could harness the power of the Infinity Stones – the Infinity Gauntlet. It’s important to note that Thor had no idea that this had happened.
Given this, the implication is that Thanos’ attack on Nidavellir occurred only shortly before the movie begins. The corpses of Eitri’s fellow dwarves are still strewn around the place, after all. So how does this make sense considering that Thanos had the Gauntlet three years ago? You’d imagine that Thor, who’d been travelling the galaxy in search of the Stones prior to Ragnarok, might have heard what happened to Nidavellir during that time.
You could argue that perhaps the Thanos post-credits scene at the end of Ulron isn’t set alongside that film and is actually a glimpse into the future, occurring just before Avengers: Infinity War. That’s perfectly possible, too, as there’s nothing in the scene to pin it to a specific date, but this clearly wasn’t the plan at the time.