These are the last words of David, the declaration of David the son of Jesse, and the declaration of the man exalted by the Most High, the anointed one of the God of Jacob and the darling of the songs of Israel. (2 Samuel 23:1 LEB)
King David, was getting ready to give the last words he had for the kingdom he loved before he left this world to go home to his God. Here, though they don't call him king but his daddy, Jesse's son. These words are also the words of of a man highly honored by the Most High God. He's anointed not just to speak these words but his whole life God had His hand on him and filled him with the Holy Spirit.
David and Bathsheba sinned not only by adultery but by homicide. He suffered great turmoil and loss because of this. But somehow forgiveness even trumps great sin, some of the worst of sin. How? David wrote Psalm 51 which shows a humble, contrite, suffering man needing to be cleansed by the blood of a lamb. He went to God, his confidante and Savior to find grace and mercy at a time when he least deserved it but most needed it.
The people and God loved and forgave him. They called him their darling who wrote so many Psalms. Another translation of the Bible calls him their sweet psalmist. Those Psalms are mentioned at this historic time in the life of God's children because out of all the Bible they are the pouring out of a man's heart to a God high and mighty who has a soft, tender heart for those who come to Him honestly and humbly.