Taiwan is heavily armed, and has the advantage of a 110 mile body of water. Until China builds more aircraft carriers, their ability to overwhelm Taiwan with conventional weapons will be quite limited.
https://www.globalfirepower.com/country-military-strength-detail.asp?country_id=taiwan
Taiwan can’t last for long against China, but they can inflict massive damage. China would need to decide if they are willing to pay that price.
A few years ago, it was reported that a couple of missiles could destroy the Three Gorges dam in China. It could kill millions and flood a massive amount of land.
Taiwan could also shoot missiles into Hong Kong and thereby damage their golden goose.