You have probably had to submit an assignment for school at some time in your life. Often there is a lot of research and reading before putting things into your own words. It feels vulnerable when you submit your best work and have to wait to see if it’s acceptable to a teacher. It might feel a little like that when you consider whether your words and heart are acceptable to God.
You might be inclined to think of the rotten things you have said and done and worry that He won’t accept you. The writer of this Psalm would not have felt perfect either, it’s simply an expression of the desire to do the right thing. The heart’s intention is what matters to God, from a place of humility, He is given access to be your rock and redeemer.