THIS MIGHT SURPRISE YOU
The answer
Rebuild the walls of Jerusalem. "Do good to Zion in your good pleasure; rebuild the walls of Jerusalem; then you will delight in right sacrifices" (Psalm 51:18-19). The heading sets the psalm "when the prophet Nathan came to him, after he had gone in to Bathsheba," in the reign of the king who took the stronghold of Zion and built there (2 Samuel 5:7-9).
Why it’s interesting
The two closing verses read like a later addition. They turn one person's plea into a plea for the whole nation, from a time when Jerusalem's walls were down and no sacrifices were being offered. The body of the psalm never names anything David did; only the heading does.
Scholarly consensus
Learn the Bible.
Not just the stories, but the history, authorship, and scholarship behind it.