Psalms 72:7

In his days shall the righteous flourish; and abundance of peace so long as the moon endureth.

The verse promises a reign of righteousness and enduring peace, in which under a just king right living thrives and the righteous flourish with full and abundant peace lasting as long as the moon endures.
That reign was held out as the opportunity open to Solomon's reign if it was guided by and followed God's instruction.
It was the outcome to come from knowing God, serving Him with a perfect and willing heart, keeping His statutes and judgments, and ruling justly in the fear of God, as David charged Solomon to do.

Solomon's history could have fulfilled this inspired prophecy.
But his later pride, political ambition, and idolatry marred his reign and turned him from God's standard.
As one of the glorious promises made to David and his house, it looks forward to the eternal ages and finds its complete fulfillment in the reign of Christ, where the righteous flourish and abundant peace prevails.