Let’s talk about sexuality.

King David famously committed adultery with a woman named Bathsheba. He tried to hide the sin and cover it up in a number of ways that plunged him deeper into trouble. Eventually he is confronted by a prophet of God and repents (you can read the story in 2 Samuel 11-12). David writes Psalm 51 as a prayer and confession to God calling out for forgiveness.
Psalm 51:1–12
[1] Have mercy on me, O God,
according to your steadfast love;
according to your abundant mercy
blot out my transgressions.
[2] Wash me thoroughly from my iniquity,
and cleanse me from my sin!
[3] For I know my transgressions,
and my sin is ever before me.
[4] Against you, you only, have I sinned
and done what is evil in your sight,
so that you may be justified in your words
and blameless in your judgment.
[5] Behold, I was brought forth in iniquity,
and in sin did my mother conceive me.
[6] Behold, you delight in truth in the inward being,
and you teach me wisdom in the secret heart.
[7] Purge me with hyssop, and I shall be clean;
wash me, and I shall be whiter than snow.
[8] Let me hear joy and gladness;
let the bones that you have broken rejoice.
[9] Hide your face from my sins,
and blot out all my iniquities.
[10] Create in me a clean heart, O God,
and renew a right spirit within me.
[11] Cast me not away from your presence,
and take not your Holy Spirit from me.
[12] Restore to me the joy of your salvation,
and uphold me with a willing spirit. (ESV)

If you’d like to learn more about Psalm 51 utilize the commentary at Bibleref.com: Psalm 51