While the events of the MCU span several years, Thanos only stepped out of the shadows at the tailend of that. If I’m not mistaken, the events of Infinity War (where he gathered all the stones himself and actually revealed his plan) takes place over the span of just a few days.