Many times after making inferences about a person, I was admonished not to "judge" by some well-meaning figure of authority who would often follow up on this with "you don't know what they're going through." A variation of this is "don't judge a book by its cover." "You can't judge me" was a typical celebrity line.
Strangely, I can't even recall seeing discussion of this attitude on the internet. I'm not sure why since it was extremely prevalent not too long in the past, but if I had to guess, it's because it was a saying from the "colorblind" times. Obama and his ilk kicked off a new era in racial politics where it became permissible to judge white people for everything they did and said, so even a white lib can't really tell their kids "don't judge" when they are teaching them to constantly judge themselves for white attitudes like speaking clearly.
The notion of not judging comes from Jesus' words in Matthew 7, "Judge not, lest you should be judged." These words are taken at face value and ripped off in simplistic and tendentious ways, but the Bible is meant to be read as a whole, not quote mined, and the full meaning is closer to "don't judge superficially." GotQuestions has a great article on the topic. Indeed, Jesus also said, "Stop judging by mere appearances, but judge correctly."
So the Bible does indeed tell us that snap judgments are wrong. But it also calls on us to investigate, discern, and make more accurate judgments. Without the ability to do this human civilization, and worship of God, would cease to exist.
I'm not sure how many parents are still repeating "don't judge" to their kids, but instead of an easy (and frankly hypocritical) hit of virtue signaling, maybe it's better to explain to them that they should keep their cool and take the time to judge accurately. Sometimes a book is indeed different from its cover, but other times the cover is exactly what you need to know. Ignoring abundant evidence from reality is not practical or Biblical. Case in point.
Jesus allowed himself to be killed, and most of the disciples did as well, because that was what their missions commanded - the same way that Abraham was about to sacrifice his son Isaac.
As I mentioned in another comment, people misunderstand Jesus' teachings as a replacement for the Old Testament when it's actually a fuller explanation of it. So the basic application of the Ten Commandments found in the OT still hold in the NT. You can read about David's saga, as well as people like Gideon and Jehosephat, and see that self-defense is fully moral in God's eyes.
Jesus also alluded to self-defense when he told his disciples to buy swords for their journeys.