Sirach, Chapter 4, Verse 20
My son, watch for the right time; fear what is evil; do not bring shame upon yourself.
Shame is generally connected with sexual ungodliness. Leviticus which is the book of the law on holiness in chapter 18 lists every sort of sexual sin. Sex is good and was invented by God and carries no shame if it is done at the right time open to life between a husband and a wife.
Leviticus 18 begins with:
My decrees you shall carry out, and my statutes you shall take care to follow. I, the LORD, am your God. Keep, then, my statutes and decrees, for the person who carries them out will find life through them. I am the LORD. None of you shall approach a close relative to have sexual intercourse. I am the LORD. (Lv. 18:4-6)
Leviticus 18 ends with:
You, however, must keep my statutes and decrees, avoiding all these abominations, both the natives and the aliens resident among you—because the previous inhabitants did all these abominations and the land became defiled; otherwise the land will vomit you out also for having defiled it, just as it vomited out the nations before you. For whoever does any of these abominations shall be cut off from the people. Heed my charge, then, not to observe the abominable customs that have been observed before your time, and thus become impure by them. I, the LORD, am your God. (Lv. 18:26-30)
Catechism of the Catholic Church
I. "MALE AND FEMALE HE CREATED THEM . . ."
2331 "God is love and in himself he lives a mystery of personal loving communion. Creating the human race in his own image. God inscribed in the humanity of man and woman the vocation, and thus the capacity and responsibility, of love and communion. "God created man in his own image male and female he created them"; He blessed them and said, "Be fruitful and multiply" "When God created man, he made him in the likeness of God. Male and female he created them, and he blessed them and named them Man when they were created."
2332 Sexuality affects all aspects of the human person in the unity of his body and soul. It especially concerns affectivity, the capacity to love and to procreate, and in a more general way the aptitude for forming bonds of communion with others.
2333 Everyone, man and woman, should acknowledge and accept his sexual identity. Physical, moral, and spiritual difference and complementarity are oriented toward the goods of marriage and the flourishing of family life. The harmony of the couple and of society depends in part on the way in which the complementarity, needs, and mutual support between the sexes are lived out.
2334 "In creating men 'male and female, God gives man and woman an equal personal dignity." "Man is a person, man and woman equally so, since both were created in the image and likeness of the personal God."
2335 Each of the two sexes is an image of the power and tenderness of God, with equal dignity though in a different way. The union of man and woman in marriage is a way of imitating in the flesh the Creator's generosity and fecundity: "Therefore a man leaves his father and his mother and cleaves to his wife, and they become one flesh." All human generations proceed from this union.
2336 Jesus came to restore creation to the purity of its origins. In the Sermon on the Mount, he interprets God's plan strictly: "You have heard that it was said, 'You shall not commit adultery.' But I say to you that everyone who looks at a woman lustfully has already committed adultery with her in his heart." What God has joined together, let not man put asunder.
The tradition of the Church has understood the sixth commandment as encompassing the whole of human sexuality.