The newly released book The Wakanda Files reveals when Iron Man (Robert Downey Jr.) found out about the existence of the six Infinity Stones.
Here's when Tony Stark found out about the existence of the Infinity Stones in the MCU. Marvel Studios had teased the existence of the elemental crystals since Phase 1 with The Avengers featuring both the Mind and Space Stones. But, it wasn't until later in the Infinity Saga that the heroes realized their collective impact.
There were several expository scenes in the MCU detailing what the Infinity Stones are and why they can be dangerous if they end up in the wrong hands. It was only in Avengers: Infinity War, however, that they became a prime focus, with Avengers: Endgame following it up. Now, the elemental crystals no longer exist in the prime universe with the Infinity Saga finished, and yet, new information about them is still revealed including when Iron Man first knew about them.
The newly-released book The Wakanda Files features an excerpt from Tony's personal journal detailing his reaction upon learning about the Infinity Stones. In it, he mentioned Thor talking about the gems, including the Mind Stone on Vision's forehead, most likely referring to their final conversation at the end of Avengers: Age of Ultron. Read the excerpt below:
"Hold up. I'm really burying the lead here. Thor mentioned six 'Infinity Stones' at the center of a whirlpool that was the destruction of Earth. And one of them is apparently bedazzling the forehead of Vision. Can we talk about that for a second? Infinity Stones?"
Unfortunately, The Wakanda Files does not reveal what Tony did with that information, although given his curious nature, chances are that he tried looking more into the elemental gems. The problem with this is there's probably very limited literature about them considering that they're essentially mystical items. In Infinity War, Wong needed to explain their origins and functions to both Tony and Bruce Banner as they gear up for Thanos' arrival. Since Tony was pretty much mum that whole time with no specific suggestion after, it's safe to assume that he didn't get far with his possible efforts in learning about the Infinity Stones. It's also worth noting that he had also been dealing with personal and professional issues in the years that preceded the arrival of the Mad Titan.
After the events of Infinity War, however, where he had a first-hand experience of how powerful the gems are, Tony might have continued to explore the make-up of the Infinity Stones which ultimately helped him create the secondary Infinity Gauntlet in Endgame. Given this, he more likely knew that he had very little chance of surviving enacting the snap. While the six Infinity Gems are no longer in the main reality, there's always a chance for them to factor into MCU Phase 4 storylines and beyond as Marvel Studios tackle the multiverse next.