The US, which is totally engaged in this war with Iran has some goals in mind that they are pursuing to achieve, they won't stop hitting Iran until their goals are met. Any country coming in between the war to support Iran, the US will see such a country as its enemy. That's what China is avoiding not coming openly to support Iran when there are no agreed benefits between them and Iran.
Let's continue to see how the war will continue to unfold with the Strait of Hormuz being closed to Iran, and Trump giving Iran the deadline to open the Strait of Hormuz by April 6. No targets on Iran till then
China's open support for Iran does not benefit them, so they do not necessarily have to. but the US can not do anything if they secretly help Iran either. American media outlets have repeatedly accused China and Russia of supporting Iran. That could be why Iran can strike US military target with astonishing precision. But you see, beside complaining, what else can they do?
The war is not over yet, but thing are pretty clear already. The US is losing ground, and its plan has completely failed in the face of Iran's tenacious resistance. If the US continues to attack Iran, they will be the ones who suffer the most.