Two things
Firstly, generals, like anybody else can be terrorized.
Secondly, even if you only kill generals, that doesn't mean you didn't cause terror for everybody else. Imagine for example that Hezbollah found a way to poison the food for Israel's top X military personnel. It would cause a state of emotional terror for many people in Israel about their food safety for decades most likely, even if they weren't in the military themselves.
No, generals in an operational military force are definitionally combatants, and cannot in fact be "terrorized".
Terrorism doesn't mean "anything that makes someone scared," or else all wars would be acts of terrorism.
There isn't a universally agreed upon definition, but generally it refers to targeting non-combatants: https://en.wikipedia.org/wiki/Terrorism
For example, when the Allies tried to assassinate Hitler with a smuggled briefcase bomb during WW2, that wasn't terrorism: that was just regular warfare. Hitler was the leader of Germany and directed its military.
Similarly, smuggling pager bombs to members of Hezbollah generally wouldn't qualify as terrorism, since Hezbollah a) is a militia (famously it's the largest non-state militia in the world), and b) was actively fighting a war against Israel — a war that Hezbollah themselves initiated.
Hezbollah is an organization that tries to destroy Israel. If any law doesn't have an answer to that problem, it isn't worth to discuss legality.
But that isn't the problem here, luckily. It was an extremely targeted operation, generals are military target and know the risks of war. A war that they started in this case.
> Firstly, generals, like anybody else can be terrorized.
This isn't part of any modern definition of terrorism, otherwise war is terrorism, stalking is terrorism, bullying is terrorism &c.
> Firstly, generals, like anybody else can be terrorized.
You know terrorism doesn't mean people were terrorized, right? Surely you understand that.
When Ukraine assassinates a Russian general with a car bomb, is that "terrorism" or is that just a targeted killing of a military leader during a war? Do you think this is somehow morally problematic beyond the typical standards of war?
Do you think that "normal" means of military action, like dropping a 500lb bomb, is less "terroristic" than essentially setting off a firecracker in their face/hands/pocket? Because, like, that's the alternative. If your position is that all forms of war are illegal, then you have the right to that opinion, but it's not a realistic position.