The story of Sodom in Genesis 19 is often used to condemn all homosexual sex. But a careful study shows that the story is mainly condemning only men who try to force other men to have sex with them, i.e. same-sex gang rape.
The men of the city of Sodom wanted to force the male guests (angels) being sheltered by Lot to have sex with them. Lot refused to hand over the guests because they had come under his protection. (Genesis 19:4-9).
This story also condemns the attempted violation of the traditional hospitality and protection given to traveling strangers while being sheltered in a house.
The people of Sodom committed many serious sins (Genesis 18:20). However none of the other Bible references to Sodom (including Ezekiel 16:48-50 and Jude 7) says that sex between men was a sin of Sodom. Sodom was destroyed because its people committed many types of immoral acts.
In summary, the Sodom story is not a condemnation of consenting male-male sex.