While the Lord did show Israel that there was a time and a place for killing, He also showed that when killing or physical harm was done outside of that time and place, the criminal had to pay the price,
“Whoever kills any man shall surely be put to death. Whoever kills an animal shall make it good, animal for animal. If a man causes disfigurement of his neighbor, as he has done, so shall it be done to him—fracture for fracture, eye for eye, tooth for tooth; as he has caused disfigurement of a man, so shall it be done to him. And whoever kills an animal shall restore it; but whoever kills a man shall be put to death. You shall have the same law for the stranger and for one from your own country; for I am the Lord your God” (Leviticus 24.17–22).
If Israel followed those laws, they would have a peaceful society.