There are such things as small terrorist groups that do a lot of harm and lack any significant social or political support. It may well be that such groups can be defeated by counter-terrorism operations.
Other so-called terrorist groups are more organic, growing out of the profound suffering and grievances of a whole population. Such groups may deploy terror (attacks by non-state actors on non-combatants), but they aren’t actually just terrorist groups. They are insurgencies.