Psalm 9 & 10 have a close relationship, so much so the Septuagint treats them as one. The acrostic structure that begins in Ps 9 continues into Ps 10, linking them together. They also have similar terminology & themes. But each stands by itself. Ps 9 is a Thanksgiving Psalm, whereas Ps 10 is more a lament. The title of both Psalms, giving the key to their fulfilment, is 'the Death of the Son' which points to the work of Messiah, the Son of God (Ps 2:7), who was prophesied to become a Man, the Seed of the Woman, to take our sin and suffer death to save us, and then crush the enemy underfoot in His resurrection (Gen 3:15). In this way, He lays the basis for the salvation of those who receive Him, and for establishing His Kingdom on earth. In this way, Ps 9 continues on from the messianic revelation of Ps 8, and this connection is confirmed by the mention of the NAME of the Lord (9:2), as in Ps 8:1,9. Thus the death of the Messiah, the Son of God is the basis for the ultimate fulfilment spoken of in these Psalms.
Ps 9 is a Thanksgiving Psalm, but whereas thanksgiving is usually for the Lord's mercies, here it is mostly for His Righteous Judgments, that in a world full of wickedness and oppression, God will set things right, punish the wicked and restore the oppressed, and right all wrongs. David starts by praising God with all his heart, proclaiming all His wonderful works, rejoicing in His salvation and singing praise to His Name or revealed nature (v1,2). He then thanks God for how He'd fought for him in the past and will fight for him in his future battles, acknowledging God's Presence with him was the key to his victories, causing his enemies to retreat, fall and be defeated before him (v3). God had supported David in his cause; judging in his favour as the Judge of Righteousness, only because he had submitted to God and His cause (v4). Likewise, when we first submit to God, He gives us more of His grace (presence), so that when we resist the enemy, he will will flee from us (Jam 4:6-7). Then in v5-6 looks at the bigger picture and declares the future final judgments of the Day of the Lord, just before God’s Kingdom is established on earth. He uses the prophetic perfect tense to emphasise these prophecies are certain to come to pass. He announces the final destruction of the wicked, blotting out their name forever. Once God's Kingdom is established, the wicked and their earthly kingdoms will be forgotten, and the wicked will be blotted out of God's Book of Life. God's enemies, who'd destroyed many cities, will themselves be destroyed, so that they can no longer destroy others. Even their memory will perish. This will be fulfilled when all the kingdoms of this world will be destroyed at Christ's 2nd Coming, when He'll establish His Kingdom on the earth. By contrast with the reign of the wicked, the Lord & His Kingdom will endure forever; He'll judge the nations from His throne (v7). "He shall judge the world in righteousness" (v8) - in Acts 17:31, Paul quotes this verse, claiming it will be fulfilled by Jesus Christ: “He has appointed a Day on which He will judge the world in righteousness by the MAN whom He has ordained. He has given assurance of this to all by RAISING Him from the DEAD.” This shows Paul understood the messianic nature of this Psalm, as revealed by its Title - that the Lord who will ultimately reign as King & Judge over the whole world, is Christ, the Son of God, who'll first become a man and die and rise again.
Then, David offers thanksgiving for the salvation of God’s people, who trust in the Messiah, who is a refuge for the oppressed, who call upon Him in times of trouble (v9). 'Trouble' is a rare word describing being in despair, cut off from all hope. Christ is also our Refuge from the Divine Judgment that we deserve for our sins. In His death, He became our Atonement (Covering), taking God's righteous judgment upon Himself, so that those who trust (take refuge) in Him are saved (as in the picture of Noah's Ark). Then he describes how believers can enjoy a growing intimate personal relationship with the Lord: "Those who KNOW Your Name will put their TRUST in You; for You, Lord, have not forsaken those who SEEK You" (v10). We should be those who continually SEEK Him, for those who SEEK Him will FIND Him (Matt 7:7-8), for He will reward us by revealing more and more of Himself to us (Heb 11:6), so that we will personally KNOW Him more, and KNOW His Name (His nature, love, faithfulness, salvation - Jesus is the ultimate revelation of His Name), and the more we KNOW Him, the more we'll be able to TRUST in Him and receive from Him. We determine how close we are to God and how much faith we have, because it is up to us to SEEK Him (Matt 6:33). "If we draw near to God, He will draw near to us" (Jam 4:8). You show how close you want to be to the Lord by how much you seek Him, and He will fulfil your heart's desire accordingly.