If you bothered to learn a little bit about Nvidia history you'd know this is false. They invested in supporting transformers before most people in this thread heard of that name. That's just one example. Look at InfiniBand and you can tell they made correct decisions years before it's obvious to everyone.
Sorry. Nvidia started supporting transformers in 2017. AI researchers discovered that its GPUs were way better than CPUs for their workloads almost a decade earlier. Specifically, Rajat Raina, Anand Madhavan and Andrew Ng at Stanford published a paper showing that GPUs could train large deep networks up to 70x faster than CPUs back in 2009.
Nvidia released CUDA in 2006-2007, which made that discovery possible, but Nvidia wasn't targeting AI with CUDA. It was targeting general high-performance computing (physics simulations, molecular dynamics, medical imaging, etc.).
There's no doubt the company seized on the AI opportunity superbly but the suitability of its product for AI, and the AI boom, was absolutely a "happy accident".