According to one theory, Tony Stark guessed the potential impact of time travel as early as Avengers Endgame.
It might not just be the Infinity Stones that Iron Man guessed exist. According to a theory shared by Screen Rant, the latter has already warned the other heroes of the risks associated with time travel. In other words, of the possibility that a powerful being is attracted by their spatio-temporal movements. During a scene with Captain America, Tony Stark indeed states that when one plays with time, he plays back. The latter was thus aware of the risks that the Avengers were taking by going to seek the Infinity Stones in the past, in order to stop Thanos once and for all.
This theory is mainly based on the various rumors attesting that Kang the Conqueror will be the next great enemy that the Avengers will have to face in the MCU. Like its identical name, it is a being whose goal is to conquer worlds, a threat that should therefore not be underestimated. His technique? The journey through time. The fluctuations caused by the superheroes could thus have aroused his curiosity, and attracted him to Earth. At the moment, the arrival of the super-villain in the MCU is nonetheless only speculated and unconfirmed. As for Iron Man, how could he have known of his existence? Still traumatized by the damage caused by Thanos, Tony Stark must have suspected the existence of other entities as powerful as the latter. So it is assumed that it was his extreme caution that spoke, rather than his knowledge of the presence of Kang the Conqueror, somewhere in the universe.