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.