Israel lost the 12 Day War with Iran because it failed to achieve its objectives:
1) Israel FAILED to destroy the Iranian nuclear program - Iran still has 408kg of HEU and IR-6 centrifuges and the nuclear program itself was not destroyed but rather rolled back by only 2 to 6 months.
2) Israel FAILED to remove the threat of Iran developing nuclear weapons - since key components of the nuclear program are intact the threat of Iran developing nuclear weapons is NOT removed. Moreover, after this war Iran reduced relations with the IAEA and might accelerate its nuclear program.
3) Israel FAILED to degrade Iranian ballistic missiles program - contrary to Western propaganda, Iran succeeded in launching 550 missiles at Israel with hundreds of impacts. And Iranian underground missile bases and underground missile production facilities survived. During the war we saw ineffectiveness of David's Sling, Arrow-3, THAAD, PAC-3 and SM-3 with only 3-4 videos of these systems successfully intercepting Iranian missiles.
4) Israel FAILED to degrade the ability of Iranian military to retaliate against Israel - while Israel killed several key generals, they have been quickly replaced and Iran started its retaliation.
5) Israel FAILED to create internal crisis within the Iranian regime - Israel killed several key Iranian generals who were pillars of the system, but these generals were replaced by other loyal generals and Iranian system showed strong resilience. Moreover, this war united Iranian people with the Islamic government and discredited pro-Western opposition as enemy collaborators.
We can conclude that despite some tactical successes, Israel failed to achieve its objectives and ISRAEL LOST THE WAR.