self-defense is allowed but we must guide it with wisdom, mercy, and discipline. the book of Numbers 25 is a proof that even God provided cities of refuge for people who are unintentional when it comes to harming others, showing His justice and mercy.
protecting lives, like what police, soldiers, or security officers do, is not an act of sin if it was done with the right intention. That being said , the the goal should always be to disable, and not destroy.
In as much as justice is necessary, we should also let love and mercy guide our actions. Every act of defense should balance protection with care, this also ensures that our decisions reflect both righteousness and compassion which is in line with the will of God
There are certain professions and cases where the use of firepower is excusable