Afghanistan was a 20 year long war. It was more costly in terms of troops, material etc.
Why would ending the war mean handing the world to the Iranian regime? That seems exaggerated. The iranians will charge a small toll for oil passing Hormuz, why would the US care? They have oil.
This isn't about the straight. It's about the Iranian-backed terrorists all over the region. It's about the genocides in Africa. Most of the horrible things in the world outside Ukraine are being instigated by Iran.
They don't have a way to reopen it without either a forever war in Iran or giving concessions to Iran to get it to open it. And an unsactioned, nuclear Iran is way worse than a booth toll in the strait.