Then when he says and, in like manner, he explains in regard to males, who leaving the natural use of the women, have burned, i.e., lusted for something beyond the intent of nature: they blazed like a fire of thorns (Ps 118:12); and this in their lusts, i.e., carnal desires, men with men, working that which is filthy: I will uncover your shame before them and they will see all your baseness (Ezek 16:37).
Then he shows that this recompense suited their guilt, when he says, and receiving in themselves, i.e., in the deformation of their nature, the recompense which was due to their error, i.e., ...the error of exchanging the truth of God for a lie; the recompense which was due, i.e., the retribution they deserved to receive according to the order of justice, which required that those who insulted God's nature by attributing to creatures what is his alone, should be affronts to their own nature. Although recompense seems to imply something good, it is taken here for any retribution, even evil: the wages of sin is death (Rom 6:23); all their wages shall be burned with fire (Mic 1:7).
It should be noted that the Apostle very reasonably considers vices against nature, which are the worst carnal sins, as punishments for idolatry, because they seem to have begun as idolatry, namely, at the time of Abraham, when idolatry is believed to have begun. That seems to be the reason why they are first recorded to have been punished among the people of Sodom (Gen 19). Furthermore, as idolatry became more widespread, these vices grew. Hence it is written that Jason founded a gymnasium right under the citadel, and he induced the noblest of the young men to wear the Greek hat (2 Macc 4:12), i.e., put them in brothel houses. Now this was not the beginning, but an increase and progression of the heathenish and foreign manners.
Source: Commentary on Romans