Create in me a clean heart, O God; and renew a right spirit within me.
Psalms 51:10 KJV
Our heart is a spiritual place where God the spirit communes with our spirit. In order for God to create a clean/pure heart within us we have to first clear our hearts of the natural. We must do away with all the distractions and worldly thoughts that have filled our Holy of Holy place so that it is empty and ready to be filled with the Glory of God.
We don’t have to be perfect to come before him. God cannot make perfect/ pure what is already so but rather he makes perfect we who are imperfect.
So if we empty ourselves before him with a Clear heart then he can create in us a Clean heart.