I am a rather new dungeon master and I don't have a lot of DnD experience myself. Especially I have never played wizards or necromancers. From a story point, there is currently a good opportunity to have a necromancer master be angry at my party. His student was killed by the party without any provocation (I understand this behaviour is called murderhobo?). The party is currently at a nearby town and the master would come to the nearby town to figure out if anyone knew what happened to his student. He is not inherently evil, he is mainly looking for answers and justice. I imagine he will not walk into town with a bunch of zombies/skeletons if he plans on asking for information and is not looking for a fight. That seems like a thing that would make a big upset, right?
Now I don't know how my characters will react. Maybe they bluff and claim they had nothing to do with it. Maybe they try reasoning. But I want to make the master so strong that they can't actually simply attack and kill him. That shouldn't be the solution to everything. Now I have myself never played a necromancer, so I don't know how one would fight effectively. There is a necromancer NPC in volos guide to monsters, however even though he is CR 9, I am afraid he might loose a head on fight against a party of 5. I assume this, because of the action economy and his lack of legendary actions. He is also rather squishy with an ac of 12. Feel free to correct me here but I think his chances in the fight aren't great. The party has a circle of the moon druid, a barbarian and a cleric (turn undead) in meele, as well as a sorcerer and a ranger (all L5).
If the PCs decide to engage him, how could a necromancer fight effectively? Maybe someone with experience in playing and fighting with necromancers could help me here. Should he first run and come back with a bunch of undead? Do I maybe need a necromancer of higher CR to be a significant challenge?
The NPC from volos guide is just an example. If it is not suitable and I need a necromancer based on a PC build or a custom built one, I am open for that. But he should still feel like a necromancer. I wouldn't expect a necromancer to have an AC of 20, 200 HP or immunity to all damage.
If it's important, the advanture is based on the lost mines of phandelver and plays in the forgotten realms.