Whenever you do something wrong, The Holy Spirit within you will let you know immediately that you have sinned and the only thing you must do is just ask for forgiveness from the Lord Jesus.
That’s all, go directly to the Lord and submit yourself to his Judgment and mercy, receive his pardon, take note not to repeat what you did “you are forgiven, now go and sin no more”, and go on with your life.
Don’t hold it in as a secret, for that is a snare; a trap well laid that will “spring” in the future.
You don’t want your sins coming back to haunt you, do you?
So remember, Just ask for forgiveness from the Lord Jesus at once, or at least as soon as you realize that it was not ok.
Life is much nicer and easy when you are with(in) Jesus, for his yoke is easy, and his burden is light (MAT 11:30)