Another explanation is regarding Psalm 30: A song of dedication of the House. This is because the Holy Temple was built twice: once by King Solomon and another time by Ezra. Therefore, it is called "a psalm" for the first Temple and "a song" for the second.
Psalm of David: In you, Lord, I have taken refuge. As it is said in the scripture (Isaiah 50:10), "Who among you fears the Lord and obeys the word of his servant? Let the one who walks in the dark, who has no light, trust in the name of the Lord and rely on their God." When Israel enters synagogues and says before the Lord, "Redeem us," He tells them that there are righteous and God-fearing people among them. They reply that in the past, during the days of Moses, Aaron, Saul, David, and Solomon, there were righteous people, but now they have been taken away from them because of their sins. As it says in Isaiah 57:1, "The righteous perish, and no one takes it to heart; the devout are taken away, and no one understands that the righteous are taken away to be spared from evil." And it says in Psalm 12:2, "Everyone lies to their neighbor; they flatter with their lips but harbor deception in their hearts." We have no one to rely on, for everything we do leads us into darkness, as it is said in Isaiah 50:10, "Whoever walks in the dark does not know where they are going." The Lord tells them to trust in His name, for He is their support. As it says in Isaiah 50:10, "Let them trust in the name of the Lord and rely on their God." And He will save anyone who trusts in His name, as He saved Hananiah, Mishael, and Azariah, who trusted in Him, as it says in Daniel 3:28, "Blessed be the God of Shadrach, Meshach and Abednego, who has sent his angel and rescued his servants!" And Daniel trusted in Him, and He saved him from the pit, as it says in Daniel 6:24, "And the king gave the order, and they brought Daniel and threw him into the lions' den. The king said to Daniel, 'May your God, whom you serve continually, rescue you!'" David said, "Since this is the confidence that anyone who trusts in You will be saved, I also trust in You."