It’s not about “Kill ’em all and let God sort ’em out.” It’s about threat management. If anyone dies, including the perpetrator, somewhere there is a failure to control the system. The ideal operation ends with everyone alive and well, including badguy.
Do not impersonate police officers.
If badguy runs, let him run. If he shoots, shoot him back first.
Use a strong, intimidating shooting stance. For intimidation and to stop without bloodshed, aim at his pelvis. If you aim center-mass, your gun blocks your view of his hands. A broken pelvis stops movement very fast. Furthermore, if you miss, it’s less likely that your bullet will injure a bystander on its way to the ground, given the relative angle. The pelvis also stops bullets very reliably, preventing overpenetration. Finally, nobody wants to be shot in the genitals.
A shot to the pelvis stops an unarmed assailant or one armed with a contact weapon. An assailant armed with a gun is still armed. For a reliable stop, you should familiarize yourself with tactical anatomy. “Aim where you’d do CPR.” Always aim to stop, never to kill.