In verse 20 there's no doubt David references angels. The word used is מַלְאָךְ / mal'āḵ. Even though the word is sometimes applied to human beings (Mal. 2:7, Rev. 1:20), it's indeed more commonly applied to spiritual beings.
Yet that's not the case in verse 21. Even though some translations use "angels" in verse 21 (NLT, NASB), most of the other English translations, just like the one you've shared (KJV, ESV, BST, ...) use "hosts". This word "hosts" is the word צָבָא / ṣāḇā' which is different than the word used for angels. I like in particular the version BPT09
22 Bendigam o Senhor todas as suas criaturas, pois tudo está sob o seu domínio!
which translates to
22 Bless the Lord all His creatures, for everything is under His dominion!
That saying, given that we (humans) are also some of "His creatures / hosts". Stating that David was "praying to" angels would have to include that David was praying to us too. Now that doesn't make sense and the problem for me is inferring from those verses that David is praying to angels. In fact, I don't even think David is praying at all but declaring / speaking blessing / praising God, similarly to how he started the chapter.
(disclosure: I came up with the question while reading a Catholic site that argues in favor of the doctrine of intercession of the saints)
This part is to address the particular context where the question came from. In addition to what was considered before, we know from Revelation 22:8-9 how angels would proceed if we worshiped them
8 I, John, am the one who heard and saw these things. And when I heard and saw them, I fell down to worship at the feet of the angel who showed me these things. 9 And he *said to me, “Do not do that; I am a fellow servant of yours and of your brothers the prophets, and of those who keep the words of this book. Worship God!”
It's no reason to be sad though... We can rest secure because better and more powerful than angels and object of angelic adoration is our beloved Jesus Christ (Hebrews 12:5-6)
5 Make sure that your character is free from the love of money, being content with what you have; for He Himself has said, “I will never desert you, nor will I ever abandon you,” 6 so that we confidently say,
“The Lord is my helper, I will not be afraid. What will man do to me?”
and yet we get both (Psalms 91:11)
For He will give His angels orders concerning you,
To protect you in all your ways.