I think everyone underestimates Taiwan. It's not a defenseless country.
Yes PRC has a massive army, but Taiwan is an island. The PRC military force on the island would be limited to how many they could send across the strait and maintain supply lines to. A large part of the island has cliffs for coastline, so there's a limited number of locations they could land. The landing operation would be a bigger operation than D-Day. The Germans didn't have much for radar and there was no satellite intel back then, and there were a lot more potential landing spots for D-Day. The Germans didn't know where the allies would make their landing. Taiwan on the other hand will be tracking those ships all the way across the strait, and they will know exactly where they'll be coming ashore.
And of course there's drones. Russia was supposed to take over Ukraine in a week (two weeks tops!) in their special operation. The US is supposed to be able to completely dominate Iran. But those damn drones are a real problem, aren't they? Where do you suppose Ukraine gets the chips from to control those drones? Taiwan likely has the designs Ukraine is using and they have drone production going completely on their island. Even if China were to completely blockade Taiwan, they could continue to produce drones endlessly. And those Ukrainian sea babies effectively neutralized the Russian Navy. Will the Chinese Navy fare better?
We can reasonably assume China is sharing tech with Russia to test on the battlefield against drone technology that Ukraine is likely sharing with Taiwan. Russia has to keep their navy far away from Ukraine to keep their ships safe from the drones. The US navy is keeping it's distance from Iran for similar reasons. If China has to keep its navy far from Taiwan to keep their ships safe from drones, an invasion of Taiwan just isn't going to work, is it?