A Psalm of David. This is what the verse (Psalm 116:12) says: "What shall I render to the Lord for all His benefits toward me?" Rabbi Samuel said: Four Psalms that Adam, the first man, should have said were said by David, and they are: (Psalm 24:1) "The earth is the Lord's, and everything in it," and why did he need to say it? Because of Adam, the world was created in its fullness. (Psalm 19:2) "The heavens declare the glory of God," and why did he need to say it? Because he saw them first. (Psalm 92:1) "A Psalm, a song for the Sabbath day," and why did he need to say it? Because the Sabbath exempted him from judgment. And (Psalm 16:5) "A Psalm of David. Preserve me, O God, for in You I put my trust," and why did he need to say it? Because he inherited the world in the beginning....
Adam and David Welcome the First Sabbath
Midrash Tehillim 5:3