ASV notes on Genesis 18:20-21

The sins in Sodom and Gomorrah down in the valley of Jordan were so terrible that just to describe it make normal people unwell, those behaviours is what happens when people follow their lust without restriction. The flesh with our five senses and feelings should follow not lead.

The society can discipline people with imprisonment and the like, it will help the society, but not the person being punished, his heart will have the same thoughts when the punishment is over as he had when it started. There is no cure in this world for a heart led by lust and desire.

Education and high moral is no solution, you can resist to a certain point, but the devil will always exploit the sin in you. But there is a solution, it is not theories and ideas, it is a person and His name is Jesus. You can say, “But He cannot be there all the time”, yes He can, by your will He moves in to stay in your heart.