The potential was always there. The main thing for Vingegaard has been his inability to deal with pressure, any kind of pressure. He lost the lead in the Tour of Poland, of all places, because he simply couldn't handle it. That's the main switch he's made, although even in last year's Tour you could see the nerves sometimes, most notably in the cobbles stage where he totally messed up. Even in this week's race in Spain you could see him looking back all the time, as if he almost can't believe he's dropping people.
But if you have the time, look up the Angliru stage in the 2020 Vuelta. He completely destroyed the peloton there, including his own team leader Roglic. There you could already see that he's made for the long climbs.