After their earlier troubles, they changed their structure. They begin research on new nodes nearly a decade out. They began 2nm research not long ago and that isn't due until at least 2029 or 2030 provided we, humans, are still alive by then. TSMC's conservative approach is what's keeping them from fumbling like Intel who thought they were invincible. 10nm is over 5 years later, and 7nm was due in 2017.
Who says 2nm isn't due until 2029? That's the next step after 3nm, which is scheduled for mass production in H2 2022 (i.e. exactly the timeline you'd expect for Apple to use it for the A16) If it takes TSMC 7 years to take the next process step after N3, Intel will have ample opportunity to catch up and retake the lead!
Not saying I would be shocked if they can't maintain the two year cadence and N2 and beyond might take a bit longer, but there's a big difference between two years and seven. Typically TSMC talks about the next process when they have the current one put to bed - they knew they had N5 licked this spring, thus they started dribbling out information about N3. In 18-24 months we should expect to begin hearing things about N2, if not well...
The basic research that goes into this is really split into two tracks. One is taken by the toolmakers, or really just ASML anymore since it looks like there's only room for one EUV tool manufacturer. Their goal is to produce equipment that allows fabs to draw smaller structures at sufficient yield and sufficient throughput. It looks like the way forward for the rest of the decade is EUV using progressively higher NAs, which may eventually require exotic/metamaterial lenses, which may fall to some of their partners/vendors like Canon. That's one end of it.
On the other end you have fabs that do research to determine "given the ability to draw smaller structures, how can we use that to draw more transistors in the same area, using less power and/or with higher performance?" When current techniques run out of gas, like planar transistors did and FinFETs are on the verge of doing, they have to develop new transistor structures. Also new materials like when they switched to copper wiring, the ongoing research into graphene, that sort of thing. That's the other end of it.
When TSMC researches "2nm" - i.e. it has been named - they have already figured out what it will be and how they want to do it, or at least narrowed it down to a few candidate approaches (which all work in the lab but they'll choose from based on how well they work in mass production) This isn't pathfinding research, it is manufacturing research - how do we mass produce something that meets the criteria of what we've defined as "2nm" at sufficient yield/cost.
Pathfinding research is what you do beyond that, and that's where TSMC may be researching stuff they'll use a decade from now. It won't have any process name labels attached to it, and may not use standard fab equipment for certain steps depending on what they are doing. This is truly blue sky stuff where they can look at trends and say "well this transistor type is not going to work beyond another couple shrinks, what can we do next?" or "silicon is going to run out of gas, we need to experiment with different materials and see which ones work best", etc.