China was also, in slightly crude terms, an underdeveloped and weak country in 1987. Japan was right next door and an absolutely massive economic powerhouse that eclipsed China. Japan's GDP was nearly 10x China's at the time.
The US had military bases in the Philippines at the time. They did and still have military bases in Japan. Taiwan was right in the pincers of the US, and China, having all the power and development of a mid-tier African country, would have no hope of taking the country without absolutely massive losses and possibly collapsing their government.
Now China is undoubtedly the most powerful country in Asia, in terms of both military strength and economic power. They could blockade Taiwan, fire a few missiles in strategic spots, and fight a war of attrition against the import-dependent island without having to put a single boot on the ground.
Ukraine made protection guarantees with the west in exchange for giving up a key aspect of its defense (nuclear weapons). Russia had collapsed and people assumed they weren't a major threat anymore. Now Ukraine has nothing to wield against Russia and the US is saying "Give us your minerals, and not in exchange for defense. Just give us your resources." Russians are dying by the thousands but their leadership still considers it worth the cost.
Now imagine the Chinese government. They see Taiwan giving the US government their most valuable resources. They see the US government having no interest in helping countries that they've partnered with for decades. They realize they don't have to shove tens of thousands into a meat grinder to get what they want. They realize that the one thing Taiwan could wield to make the world support their cause (chips and the risk of the global tech industry falling into chaos should manufacturing be interrupted) might be moved outside their borders. Not taking advantage of this opportunity would be China ignoring a huge sign that says "It's free real estate."
There is less of a reason to defend Taiwan. Doesn't mean the US won't try. Ultimately, the US wants to use Taiwan, Japan, SK, PH to contain China.
This is to re-secure the advanced chip supply in case a conflict actually breaks out in the pacific.
For China, taking Taiwan isn't really about TSMC. It's an ideology that stems from the century of humiliation. Furthermore, once they take Taiwan, SK, Japan, PH will eventually bow as well.