Right war: Fighting for a noble purpose.
After Amenhotep IV died about 2000 years ago BC, Joseph went to Egypt. About 400 years BC after Joseph was dead, his descendant Moses freed the Jews. Moses had to unite the people, so God made him follow the teaching of Amenhotep IV to worship one God. Moses inspired the beginning of the Old Testament to be written because of Amenhotep IV and God.
After Moses died, Samuel became the prophet. He made Saul the King. Saul had David destroy the enemies of the Jews by an exemplary war. Saul violated God's trust, so God had David have a right war against Saul. David defeated Saul. God wants us to fight for good reasons.