What happens when Iran responds by firing missiles on Israel or on a US ship and inflicts major casualties on either targets, though?

Even the US can't move an Iran sized invasion force overnight. It was a couple of years from 9/11 until the invasion of Iraq.

Exactly. See, sinking of the General Belgrano.