There have always been gay people, and in every culture, though. While trans is a relatively modern concept, there have definitely been gender-variant people across cultures too.
The fact that it’s been vaguely mentioned at all in the Bible suggests it was a non-issue. Romans, for example, social advancement revolved around patronage… which involved gay sex.