Psalm 24 is one of the few called Invitatory Psalms used to begin the recitation of the Divine Office or Liturgy of the Hours according to monastic tradition.
It has a militaristic ring to it: “Who is the king of glory? The Lord, the mighty,, the valiant. The Lord , the valiant in war. Who is he, the king of glory? He, the Lord of armies, he is the king of glory.
It was the Lord of armies and military force, in fact at times even the extermination of enemies which won the settlement of the land of Canaan for the twelve tribes of Israel/Jacob. For the chosen people war was not only acceptable, it often seems it was God driven.