Iran isn't an invasion. It's just lobbing some missiles hoping they'll cry uncle, which has worked approximately never. It says nothing about the ability of Iran to resist an invasion.
Russia has 3x the population of Ukraine. China has over 56x Taiwan's population.
Invading an island nation like Taiwan wouldn't be easy, but I'm guessing China's takeaway from the Ukraine War and Iran War is that they can win pretty quickly as long as they strike hard, fast, with overwhelming force, and start invading by sea and air immediately and continuously. They'd lose many people initially (though relative to their population, maybe not enough to break their stride), but victory only requires commitment on China's part. They're already building a fleet of specially developed landing ships: https://www.theguardian.com/world/2025/mar/20/china-landing-...
The only thing that could possibly save Taiwan is American intervention. But Iran has shown the US has zero interest in shedding it's own blood in open combat even to win a war it started. And in his first term there were claims Trump admitted privately he wouldn't actually save Taiwan if China invaded.