Step 1 "They exchanged the glory of the incorruptible God for an image in the form of corruptible man ..." (verse 23).
Step 2 "Therefore God gave them over in the lusts of their hearts to impurity" (verse 24).
Step 3 "... so that their bodies would be dishonored among them" (end of verse 24). In response to the rejection of God's glory as their treasure, God wills that there be a disordering of their bodily life in dishonorable deeds. He hands them over to impurity "so that their bodies would be dishonored among them." The sexual disordering of the human race is a judgment of God for our exchanging him for the creature - all of us.
Second time through the same steps - verses 25-27
Step 1 "They exchanged the truth of God for a lie, and worshiped and served the creature rather than the Creator, who is blessed forever. Amen" (verse 25). This parallels verse 23: they exchanged the glory of God for images. The "truth of God" is that he is glorious and to be desired above all things. The "lie" preferred by us humans is that the creature is more desirable than God.
Step 2 "For this reason God gave them over to degrading passions" (verse 26). That parallels verse 24: "God gave them over in the lusts of their hearts to impurity."
Step 3 "... for their women exchanged the natural function for that which is unnatural, and in the same way also the men abandoned the natural function of the woman and burned in their desire toward one another, men with men committing indecent acts" (verses 26b-27). That corresponds to verse 24b: "... so that their bodies would be dishonored among them." So the dishonoring of the body that Paul had in mind in verse 24 is specifically homosexual behavior. And notice carefully, now we can say more specifically than in the first sequence of thought: The sexual disordering of the human race, especially homosexuality (but not only homosexuality) is a judgment of God for our exchanging the truth of God for a lie.
Third time through the same three-fold sequence - verse 28