If the push comes to shove, a US carrier group parked in Taiwan's territorial waters makes any sea invasion impossible if it's willing to shoot at Chinese ships; you can't ship and land a million soldiers across a hostile sea, and China can't (at the moment) win the sea battle.
It's debatable to what extent USA is willing to fight for that, but if it chooses to do so, then now and at least until 2030 USA has enough military might to enforce a stalemate/status quo across the Taiwan strait, no matter how much it gets escalated. China can force Kinmen and Matsu islands, but invading Taiwan proper requires either USA not joining the war or a stronger China.
So IMHO the fate of Taiwan in this century depends on how much USA will be willing to intervene to protect it; and the physical location of semiconductor factories is a big factor influencing that willingness.
If a carrier is willing to shoot at Chinese ships and close enough to reliably do so, then the Chinese are willing to shoot at it and are close enough to reliably do so.
Chinese antiship weapons are significantly better than the US. Without immediately inducing Kessler syndrome and still being very lucky, I don't see how a US carrier is going to survive two dozen DF-21 missiles simultaneously, a couple hundred supersonic cruise missiles, and whatever submarines or UUVs the Chinese have got lurking there.
The US fleets most advanced weapon, SM-6, still can't reliably intercept MRBMs or SRBMs(https://www.defensedaily.com/mda-conducts-sm-6-missile-raid-..., https://www.reuters.com/business/aerospace-defense/us-fails-...) and has never intercepted a single IRBM. I struggle to see how it can possibly defend against dozens of IRBMs with advanced countermeasures that aren't on a predefined trajectory if it can't even hit a single one with no countermeasures. And by the way, they're building over 100 missiles a year. They could realistically have 1000 antiship IRBMs in a few year - more antiship IRBMs alone than the combined amount of interceptors of all carriers the US could hope to deploy within 8000km of Taiwan.
Right now the best the US can do is try to jam the missiles and deploy smoke, and hope they miss, which they probably won't.
A US carrier group in Taiwan's territorial waters is 100% getting absolutely wiped. The US will never risk getting their carriers that close to Chinese weapons, they'll stay thousands of kilometers away and hope for the best.
The US's best hope is to keep its assets far away from the theater and cooperate with Taiwan to try to whittle away the Chinese fleet and prevent them from setting up a beachhead, and hope the Chinese air defences, low-frequency radars, and signals intelligence platforms can't stop the counterattack.
The Chinese also won't need a million soldiers. They just need to get a few dozen thousand on the shores with air superiority and disable the Taiwanese military then take as much time as they want pacifying the island.
In a full scale conflict, carrier group would be sunk by subs in the first 15 minutes. Those carrier groups are a relic of the past that only works against unsophisticated adversaries who do not have the largest submarine fleet in the world [1] or nukes. US military planners know this so any such things will be withdrawn shortly before shit is about to go down, or (more likely) never brought in in the first place. And it doubly does not work against adversaries without whom we can't even build anything because we outsourced all of our production there. In 2 years we couldn't even scale the production of N95 face masks on US soil, let alone anything more complicated. The colossus has legs of clay and US government (and its owner - the US business establishment) is to blame.
Prediction: Taiwan will be retaken by China by 2030 and the US will do bupkis about it other than saber rattling. It can't even do sanctions, since that'd be sort of like US imposing sanctions on its own manufacturing base. Xi knows this. He will use our weakness to his advantage. It would seem that business establishments are already acknowledging this, hence this massive investment in the US. On the other hand, this is also forcing China's hand - they can't afford to wait until it becomes feasible for the US to impose effective sanctions. Their colossus too has legs of clay. Except the legs are not as weak.
The US has no hope to even possibly defend surface naval assets in the Taiwan strait or its periphery. A carrier strike group literally doesn't have as many interceptors as the Chinese could fire missiles at them from that distance.
The US will have to leave the Taiwan strait waters to China and attempt to strike as many Chinese boats there as they can from a distance in the air.
Because the US has been ruled by incompetent and corrupt imbeciles since the 70s. And there's now a second generation of incompetent imbeciles in the government who were students back then. If you think they can avert, let alone win this, you're out of your mind. Our best play here is to not intervene on another country's behalf seeing how we couldn't win against a bunch of semi-literate cave dwellers with Kalashnikovs after 20 years and 2 trillion dollars. War against today's China would be unwinnable in _any_ shape or form whatsoever under any circumstances even if we had competent leadership, which is something we do not have, and haven't seen in 50 years.
Watch the YT video linked in the article. China is in the position of strength now. They're on an upward trajectory. We're on a steep downward one. And that won't change until we at least acknowledge the realities of our present predicament, and begin the serious, careful work to rectify it. I see no signs of that even being possible the way things are right now, let alone likely.
I suppose "ensure" is too definite of a claim. But it's clear that the US can apply all types of pressure to try to hinder a takeover of TSMC/Taiwan. Methods range from open negotiations, to trade/economics sanctions, etc.
How will the USA ensure that?