If China could afford to invade Taiwan, they would have by now. This is all Chicom bluster.
They’re as broke as Venezuela.
Economic circumstances aside, an invasion of Taiwan will make Ukraine look like a cake walk. I think that may have been why Xi opted to let Putin go first. Putin already had history on his side with previous invasions of Georgia and Crimea.
I once read that the US Military specifically “hopped” Formosa (Taiwan) during WWII because of the terrain and logistics. It was estimated then that an invasion of that island would cost 500k US casualties.
Militaries have only advanced since then, and Taiwan’s population has grown significantly. I do not believe the Chinese people would want to sacrifice 2 to 3 million of their sons on such an endeavor.