My theory is that China is playing wait-and-see. Likely futures:
Russia survives; business as usual, if much poorer. China doesn't want to poison that relationship.
Russia falls; China helpfully "adopts" the orphaned Asian lands.
Iran falls; turmoil follows; the USA as usual (since WWII) has no plans for afterwards. Do nothing until opportunity presents itself.
Iran survives; the US falters; wait and benefit from the opening that creates.
I can't see a path where China picking sides in UKR/RUS nor USA/IRAN benefits China at all.
not sure if anybody notices, after the war, russia opens a lot of markets to chinese companys.
As someone says, don’t interrupt a rival when they are making a mistake. China can gain quite a lot by just waiting on the side lines, contributing as much as they can get away with while still looking reasonable (which is quite easy, when the other protagonists are Putin, Trump, or Khamenei jr).