Initially it's unclear what the goal was. But now the goal must be opening the strait of Hormuz ASAP. There's going to be serious economic fallout if that doesn't happen[0]. It remains to be seen how realistic that goal actually is. Iran has big advantages in their favor.

[0] https://www.cnn.com/2026/07/08/business/iran-oil-trump-strai...

Can we agree on "the strait was open before the war" so it can't be a goal for the war.

No, unfortunately, because circumstances change. It was unbelievably stupid to attack Iran, and everyone involved knew this might happen, but now that it has happened it needs to be dealt with one way or the other.