Matthew 3:8 Prove by the way you live that you have repented of your sins and turned to God. As long as you live in this earth, you will make mistakes, there are times when you might not obey God. The main thing is to have a repentant heart when the Holy Spirit correct you. Numbers 22:34 And Balaam said to the Angel of the LORD, “I have sinned, for I did not know You stood in the way against me. Now therefore, if it displeases You, I will turn back.”
Christ came to reconcile us with God. Balaam disobeyed God and after the Holy Spirit corrected him, he repentant. Pride mostly stand on our way to repentance. God looks at the heart. David is the great example for a man with repentant heart hence he was referred to as a man after God’s heart. Even after committing an error he will pour out his heart before God.
Psalm 51:1-13 Have mercy upon me, O God, According to Your lovingkindness; According to the multitude of Your tender mercies, Blot out my transgressions.  Wash me thoroughly from my iniquity, And cleanse me from my sin.  For I acknowledge my transgressions, And my sin is always before me.  Against You, You only, have I sinned, And done this evil in Your sight- That You may be found just when You speak, And blameless when You judge.  Behold, I was brought forth in iniquity, And in sin my mother conceived me.  Behold, You desire truth in the inward parts, And in the hidden part You will make me to know wisdom.  Purge me with hyssop, and I shall be clean; Wash me, and I shall be whiter than snow.  Make me hear joy and gladness, That the bones You have broken may rejoice.  Hide Your face from my sins, And blot out all my iniquities.  Create in me a clean heart, O God, And renew a steadfast spirit within me.  Do not cast me away from Your presence, And do not take Your Holy Spirit from me.  Restore to me the joy of Your salvation, And uphold me by Your generous Spirit.  Then I will teach transgressors Your ways, And sinners shall be converted to You.