Do you mean from a historical standpoint? It depends on the culture, but it's pretty recent in its current iteration — in the west, it followed the rise of Christianity. For much of western history at least, it was considered OK to pitch, within reason (manly!) but not to catch (effeminate!). Warring states China was pretty similar. I'm less familiar with India but in any case that would have been suppressed by the Mughals.
Leviticus 18:22 "You shall not lie with a male as one lies with a female; it is an abomination". It sounds pretty clear to me and at best could be proscribing both male homosexuality and pedersasty in one statement.
Edit: but ofc I do not know what the og scroll says nor would I be equipped to translate it or debate the true meaning of it.
And yet Thailand has had numerous genders for centuries(?). I was reading about it it’s fascinating they have a third classification with numerous sub-gender types such as Kathoey, Tom, Dee, Tom-Dee, Tom-Gay, and many more.