This might be outdated, but last I heard the US was only blocking ships going to/from Iran and ships which paid Iran's protection money, right? Not all traffic through the strait?
And for Iran it seems "countries it opposes" is basically everyone...
Iran was quite happy to let Chinese and Russian flagged ships to pass. Now, the US is blocking those as well as anything heading toward Iran. The US recently had a short lived Operation Dumb Name to have the US Navy escort ships out of the straight. It lasted less than 48 hours.
I stand corrected then. Blocking "anything heading toward Iran" is perfectly reasonable given they're at war, and blocking Russian ships makes sense given the separate ongoing conflict in Ukraine, but I don't really see the point in the US blocking Chinese ships going to countries that aren't Iran, unless there's credible evidence China is giving direct aid to Iran. Is there? Otherwise, allowing them through seems like a pretty easy way to fix the oil shortage without much downside, at least until Iran starts blocking them again.
China is buying the oil. They don't care about US Sanctions. Not really sure what you mean by easy way to fix the shortage. Twenty percent of the world's oil trade is no longer trading because the straight is closed. The US is playing a game of "if we can't have any, nobody can have any".