Here's what I would do if I were Xi. I'd invade Taiwan.
Consider: America is weaker and more divided that it has been for 50 years. A weak, divided America is likely what Xi will see as being in China's best interests.
Consider also: NATO will find itself strained in any response, because it has sent so much equipment to Ukraine that it might not have a lot left to send to Taiwan. NATO seems to want to keep the pressure on Russia, to bleed Putin and get regime change. NATO will either be distracted from Taiwan, or will have to give up their dreams of different rulers in the Kremlin. It may take NATO long enough to figure out what to do that the Taiwan invasion becomes a fait accompli. Advantage: China.
Consider also : A June or July invasion will likely wrap up before the elections in November. Losing Taiwan (after a pretty disastrous response to Ukraine and a completely disastrous pullout from Afghanistan) will likely contribute to a rout of the Democrats in the election. Big GOP Congressional majorities will further weaken Biden. A weakened Biden is likely what Xi will see as being in China's best interests.
Consider also : Even if a strong Republican gets elected to the White House in 2024, that will be 2 years after the fact, allowing China to consolidate/reintegrate Taiwan. It will be hard to put that toothpaste back in the bottle.
The downside is looking like an aggressor in public. Perhaps the biggest fallout from Russia's invasion of Ukraine is the prospect of Finland and Sweden joining NATO out of a sense of needing help against the Russian bear. You could see something similar with India, Indonesia, Philippines, Korea, and Japan joining together in an anti-China bloc. My take is that Xi doesn't care - China has never been expansionist outside of China (and they absolutely see Taiwan as part of China). The domination they seek is economic, not military, and since the hypothetical Asian bloc would never be able to invade the homeland, this is likely not much of a consideration. Also, if America and NATO are weakened then there may not be a credible alternative to China in Asia.
So the downsides are low, the benefits to China are likely high, and both of these could very well change in the next two (or even one) year. The iron is hot, right now. Timing will probably never be more in China's favor than now.
This is maybe a good time to short Taiwanese stocks.