Look into the properties of a creature, 05 - CreatureLocalStrings. Click on the thre dots (...) . Then press the "Add" button and modify the right hand side "Value", by eg typing "Undead" (without "") there.
Open the effect editor for the effect to work with, look for 01 - Applicability, affectNeverList. Press the ... and "Add". Modify the Value entry by typing Undead.
You have now an effect that will never work on this creature (or all other creautres with local string with the value "Undead").
Works just the same for the affectOnlyList - in this case eg making the effect only work on Undead.
Player characters dont use local strings - instead the engine checks the known trait tags of a pc fir keywords appearing as values in the affectNever and affectOnly lists. You could eg make undead pc by assinging them a trait with the tag "Undead".