The US is being forced by two reinforcing doctrines, the Wolfowitz Doctrine and the Thucydides Trap, to try to prevent China becoming the 'Number One' country in the next few years. China just has to keep growing its GDP as normal, at a higher rate than the US's GDP growth, to become 'Number One' very soon. It's an arithmetical certainty that China will come out on top. And that crossover-point is around 2025.
The US needs to initiate a conflict about 5 years before the crossover-point to be certain of winning that war. China needs to hold off any war until after the crossover point, in effect to 'turn the other cheek' to US provocations while the China grows and the US declines in relative terms.
Note that I said above that the US needs to initiate the conflict about 5 years before the crossover-point. That date is now two years in the past, the US should have started that war back in 2020. It's very likely that the US has 'missed the bus'. It might start the war now, but its chances of coming out on top now are very much diminished, due to those two years of lost opportunity.
China does NOT want a war now, because a war now would only get in the way and would only slow down China's climb to the top. If China starts anything it would only be 3-5 years after the crossover-point, say after 2028. By then the US will be very much 'Number Two' on the ladder.
Also, what happens if at the same time as Russia moves in on Ukraine, China moves in on Taiwan?
Regarding China and Taiwan, I doubt China would risk an open war either for what would essentially only be national pride. Of course if there was a major war in Europe, in the scale were the US had to fully commit to, then maybe it would start to make sense. Still, expensive and risky as hell.