All of the resurrection spells require touching the dead creature's body. (Even true resurrection can only create a new body "if the original no longer exists".) If your necromancer keeps the dead NPC's body and hides it somewhere, resurrection won't work.
Your necromancer could, for example, make the dead NPC into an undead and keep it as a servant, in which case the player characters would have to find the undead and re-kill it.
If you've decided that your world doesn't contain any NPCs capable of casting true resurrection, then your necromancer can simply destroy the body, and not bother with hiding it.
There's also the possibility of doing something involving the line "the soul must be free and willing to return". Perhaps the NPC doesn't want to return, or perhaps the necromancer applied some threat or trauma that makes the NPC unwilling to return, or perhaps the necromancer has some way of trapping the NPC's soul. (I wasn't able to find a 5e equivalent of the 3.5e spell soul bind, but there might still exist something like that, or you could just make something up. Icyfire notes that the demilich has a soul-trapping ability.) Personally I like the "hide the body" approach better, though.