US and the west place a lot of strategic importance in Taiwan so they may come to the defense, but it is unlikely to be defendable for long.
We are seemingly moving towards another Cold War: China and Russia vs US and NATO.
If Taiwan doesn't already have plans to destroy them in case of an invasion I'm sure they are the target of some missiles from outside the country.
The next step if China were to move on Taiwan, other than getting all the data and IP from TSMC's internal networks, would be to spin up a US division and assign that IP to that new corporation. And then the US should try to get as many of TSMC's employees to the US that they can.
Operation Paperclip TSMC.
Sure an important part. But lets not forget that there is a lot of knowledge in TSMC too. And China is trying to slowly buy their engineers.
Intel and AMD (now Global Foundries) both had access to same Dutch company's product and they didn't or barley managed to keep up.
First, we have TSMC working on building in the US, that should be continued and accelerated if possible.
Second, work with Taiwan to force TSMC to split itself into a US and Taiwan division. The US division will be granted all the same intellectual property and will be IPO'd (with TSMC retaining a super majority ownership position; if China ever gets ahold of TSMC, we'd simply force the parent to sell its majority ownership position on national security grounds). But how will Taiwan force that outcome on TSMC? Nation states have fun ways to make things like that happen when it comes to their domestic corporations. But why would Taiwan do that? The same reason they're getting TSMC to build fabs in the US (which is a political move): because we're asking nicely and the US is the only thing keeping Taiwan an independent liberal democracy. TSMC is so big and strategically important, they're a political entity as far as Taiwan is concerned, they're even more outsized vs Taiwan than Samsung is vs South Korea.
If the invasion comes, it will come because China will think it will succeed. And if it looks like it's going to succeed, why blow your own factories? After the war, you will have to return to ordinary life, and hopefully a job. Blowing away your own factories, to spite your enemies doesn't make sense. Sure you deny China access yo them. But you deprive your people who will have to live after the war there even more.
More likely scenario is that US is going to try to get them blown up (probably not directly)