Does the Piercer feat work with spells?

Does the Piercer feat (TCoE, p. 80) work with spells?

The list of spells it would work with isn’t long – thorn whip seems to be the only option, really – but does it work?