The US is not an ally of Ukraine. We never had any kind of commitment to defend them. We give them weapons and other support as a way of knocking Russia down and preventing them from threatening our actual allies.
The situation with Taiwan is completely different due to the Taiwan Relations Act of 1979, and official policy statements by multiple presidential administrations since then. The US would absolutely defend Taiwan against a major attack. The question is how far that commitment goes? If China uses tactical nuclear weapons at sea, would the US escalate or back off? No one knows what would really happen in that scenario...
It's also worth pointing out that United States spent a significant amount of effort to prevent Taiwan's indigenous nuclear weapons program from reaching fruition.
The situation with Taiwan is completely different due to the Taiwan Relations Act of 1979, and official policy statements by multiple presidential administrations since then. The US would absolutely defend Taiwan against a major attack. The question is how far that commitment goes? If China uses tactical nuclear weapons at sea, would the US escalate or back off? No one knows what would really happen in that scenario...