Killing the big bad doesn’t win the war. We killed the big bad multiple times. They just make new ones. Even if you take out the entire terrorist organization, they just make new ones.
And you just keep killing the new ones as soon as they appear. You must also track down the sponsors and kill them too.
"If you kill enough of them, they will stop fighting" (Gen Curtis LeMay)
That may indeed mean killing all of them. As in genocide. Expulsion of an entire population works too. It has been done successfully in the Middle East region and more than once. It is the ultimate "solution" to intractable conflict.
Nobody should expect that this is easy. It is brutal, ugly work that permanently and unfavorably changes the people who resist terrorist incursions. It changes their society as well.
And, we should, NAY, MUST! Keep killing them!