We (the US) have excellent surveillance of many of our potential enemies (and probably friends). Attacks like these are interesting flash points. The one in April was probably largely used by Iran to test the missile defense systems in Isreal (and ours, since we have Aegis missile cruisers over there, too). This one feels a little less like a test, but every time they do this it does tell both sides a little more. I guarantee we have lots of people watching where the fueling and launching was taking place in Iran, and I guarantee that Iran is paying a lot of attention to not only the effectiveness of the air defense systems, but the number of them. All of this stuff is expensive, and it's hard to ramp up production in a hurry without a real mobilization effort.
Which is what I was thinking about regarding the so-called two-front war. First, we have rarely been ready to fight a two front war against major adversaries. To do so would take a massive mobilization, and a massive commitment of our nation's treasure. Yes, we have often had the goal of defending a two-front war, but even that has always been pretty suspect. Much of our current posture, as I understand it (which isn't all that well) is to (1) delay, and (2) flex. So we can send the Navy and a unit from the 18th Airborne Corps or the Marine Expeditionary Force anywhere in the world, and quickly. And our Air Force is able to reach out an touch someone just about anywhere in the world, though sometimes it requires forward deploying some folks (whether that's to Europe, Guam, or Diego Garcia (Indian Ocean). We can also follow-up with mechanized (heavier) units pretty quickly. Those units won't be enough to win a war, but it is enough to let whomever know that we're not screwing around. Notwithstanding the inability to fight a two-front war, we do spend the most money on our military by far, which results in not the biggest number of people, but the best arsenal, and--almost certainly--the best combined arms training. (Side note: I'm sure the IDF is pretty freakin' jacked as militaries go, but it's tiny compared to the US).
FYI, that combined arms training is arguably unique to the US. The amount of work that goes into training our military from the highest staff levels down to the lowest private/seaman is remarkable compared to the rest of the world. That doesn't guarantee success--the enemy still has a vote--but it does mean that we're unlikely to run into the same kinds of trouble that Russia has run into in Ukraine.
Fighting even a one-front war against a major adversary (Russia or China) would require mobilization--and it would have at any time during the Cold War, too. We used to maintain a more significant defensive posture: e.g., in the Fulda Gap to prevent the Reds from pouring through Germany, and on the DMZ in Korea, to prevent the insane leaders of North Korea from being too insane. But realistically, that's not our current threat, and it doesn't make much sense to maintain that kind of defensive force. And even those defensive forces were never going to be enough to win the war. In Korea--the one I know more about because I was there--we were there to give our mainland forces a month to deploy. That was it: our goal was to survive for a month. (Also, the South Korean's military was generally more than 10x as large as our forces there). I suspect that is still the goal.
Currently, our military is populated with a historically large (not the biggest) number of combat veterans. That's useful, but they aren't veterans of the kinds of wars we're talking about. They are really good at clearing and holding cities from insurgents, but major force-on-force fighting isn't something we've done, really since Korea in the 50s. Even in Vietnam, we were primarily fighting light infantry battles, ordinarily not against a well-organized, state actor. We've trained on it a lot--and we still do--but another thing that is rapidly changing is the impact of surveillance and remote warfare on the battlefield. That's a big reason for everything bogging down in Ukraine. It is very difficult to mass for attacks without the enemy knowing what you are doing, and defending against it with remote actors: drones, artillery, and other long-range strike capability.
All of which is to say there's a lot of uncertainty about where things are headed, but the bottom line is that fighting a major adversary in any war would be brutal for all involved, and is something we should be trying to avoid (not at all costs--this isn't a Neville Chamerlain rant).
I think if we intended to strike Iran (in a significant way) for the attack it just conducted, we would have done so already, while their launching equipment was in the field and easy to target. That being said, if they set up to do it again, they have to be concerned that we're in the mix to come right at them because we now know where they are.
And one last comment on the wars of the last two decades: the military performed exceptionally well throughout. But the government's mission was not one that the military was well-suited for. If we had really wanted to democratize Iraq and Afghanistan, we would have had to commit far more non-military personnel than there was ever the political will to do. You don't democratize on the cheap, especially in places that have never had a taste of it before. In Afghanistan, the mission to get rid of Al Qaeda was a worthy one, but there was a big leap from that to trying to turn the place into a democracy.
My views on international relations are not quite Kissinger-style/Machiavellian, but we have had trouble reminding ourselves what realistic outcomes might be in various places (Kissinger struggled with that, too, even though he took a much more transactional view of what we did overseas).