This is “a song” celebrating God’s triumphal ascent to Mount Zion; may have been David’s victory or moving the ark to Zion.
The Psalmist reviewed the history of Israel from the wilderness wanderings to the occupation and conquest of the land. He Emphasized God’s choice of Zion, which resulted in Israel’s taking many Canaanites as captives and the Israelites receiving gifts or spoils from the captives. This is the reason he sang praises: God was marching triumphantly on behalf of the oppressed. David called on others to join him in praising their strong Lord.