Here is an example how to "exclude" specific interfaces from template.
DX UIM 20.4.x / 23.4.x
SNMPCOLLECTOR
Disclaimer - This KB article give you example/tips how to facilitate filtering criteria.
This is an example, the same goal might be achieved via different approach.
CASE 1 - Naming for criteria.
In this example, template is applied on interfaces where string "Vlan" is included in ifDescription.
(*) Value is case sensitive. "vlan" or "VLAN" not match in this example.
CASE 2 - 'User Tag' (Component User Defined Property 1)
In this example, template is applied to the interface where the same value is found in it's Component User Defined Property 1.