From my own previous answer on M&TV:
Thanos decides to do it himself after (it is assumed) the events of Age of Ulton although it's not clear when this event actually takes place in the MCU timeline
We do know that Thanos had the Infinity Gauntlet constructed by Eitri at Nedavellir but it seems that this took place considerably after AoU (and
after Thor: Ragnarok)and we are just seeing the outcome as a flash forward and Thanos really started getting serious about the Infinity Stones just before IW after Odin has moved on from Asgard and Nedavellir was left undefended.*
Updated: Per this answer on SF&F
Per the film's Directors/Screenwriters Commentary, Thanos' motivation for deciding to gather the stones is that he finally (after many years of searching) learned the location of the lost Soul Stone. Before this he seems content to get on with obliterating one planet at a time and making sure that he knows roughly where the other stones are, safe in the knowledge that he's made himself powerful enough (through his armies and his 'children of Thanos') to go and collect them when the need arises.
Stephen McFeely: "The catalyst for the whole movie was when Thanos figured out where the Soul Stone was because he captured Nebula on his ship and rooted around in her brain and figured out that Gamora knew where the Soul Stone was."
Joseph Russo: "It's the reason why he hasn't gone for it before, because he knows that the minute he does, the forces of the universe are gonna line up against him. If he doesn't know where the Soul Stone is, then what's the point?"
* and Asgard is, as we now know, destroyed in Thor Ragnarok
Essentially, it seems Nedavellir was destroyed after Thor: Ragnarok, and so Thanos could not have had the Gauntlet at the actual time setting of Age of Ultron so the post-credit scene in AoU MUST have been a flash forward.