Self defense is allowed in most countries, the difference being appropriate measures. If someone attacks me and I punch them to get them off, that’s justified self defense and unless you’re unlucky it’s not going to be lethal on the attacking party. As soon as you’ve pulled out a gun, other brought a lethal tool into the mix.