Two things I want to point out right away:
#1 – In the original Hebrew, the name used for “Lord” here is “Yahweh”. This is the personal name of God, referencing our personal relationship with God.
#2 – The city of Jerusalem, at the time when this was written, was the future home of the temple Solomon built, and was also the seat of government. Court was held here, and the judges were under the authority of God.
Jerusalem was a city united by God. All tribes of Israel would come together three times each year, particularly for the Passover Festival.
The final verses, Psalm 122:6-9, are King David’s prayer for Jerusalem, a prayer for peace, which will lead to security and prosperity for all the people.
We need to be praying for our community, our government authorities, and our world to turn back to God and be under His authority. By living under His authority, we will live in peace, which, ultimately will lead to security and prosperity for our world, too.