There are other writers recognized in Psalms. Moses wrote Psalms 91, Solomon wrote some and David wrote many and Psalm 5 is one of those. David calls on God to hear his prayer because he is comes to God every morning and seeks his direction. He knows that God abhors evil and he calls on him to guide his way because his enemies are corrupt and devious.
He asks God to destroy them and make their own wickedness turn against them. He acknowledges that God is faithful to those who put their trust in him.
Let those who put their trust in God rejoice. God will bless the righteous. God will make his favor a shield to surround those who trust in him with righteousness.