Hezbollah was formed after Israel's 1982 invasion of Lebanon, which killed 17k+ people, mostly civilians, and which Israeli historian Ilan Pappé said was mainly unprovoked (see below). Israel's explanation for why they decided to risk killing tens of thousands of non-Israelis - which is ultimately what their invasion did - was highly dishonest.
The reason for Israel's invasion of Lebanon in 1982:
Israel said it invaded Lebanon in June 1982 to stop PLO attacks from southern Lebanon and push Palestinian fighters far enough north to protect northern Israel.† The immediate trigger was the attempted assassination of Israel’s ambassador in London, Shlomo Argov. But that attack was carried out by the Abu Nidal group (based in Iraq), not the PLO, and Israel used it as the opening for a much broader war: destroying the PLO’s power in Lebanon, besieging Beirut, weakening Syrian influence, and trying to install a friendly Lebanese government. So, bluntly: there was a real security problem, but the 1982 invasion was also a war of choice and political engineering, not just self-defense.
† Right before the June 1982 invasion, the "they were shelling Galilee" line is weak: even the IDF says that after the July 1981 Habib ceasefire, "from July 1981 to June 1982, the Israeli-Lebanese border was quiet."