When James T. Kirk encounters the man who would forever be known as his greatest villain, Khan Noonien Singh, we learn something about Earth history. In the late 20th century, humanity attempted to go beyond its physical limitations via genetic manipulation. The result was a breed of super-intelligent, super-strong people who had commensurate aggression and arrogance. The war between unaltered humans and these augments was the Eugenics War and it either caused or was a contributing factor to the world war that would send humanity into a post-apocalyptic dark age, only brought out by the work of Zefram Cochran. This caused all genetic manipulation to be banned in the Federation.
Fast forward a century or so and we learn that that ban has been slightly lifted. Genetic engineering is now acceptable as a corrective tool for people born with genetic defects. Enhancement beyond that is illegal and people who have been enhanced are second-class citizens at best and locked away at worst.
Consider also technological enhancement. Jean-Luc Picard has an artificial heart. Geordi LaForge has a visor that corrects his blindness. Yet we never see a single instance of a human who has used technology to augment their body in such a way that surpasses the limitations of a fully abled human. In fact, we have the Borg in stark contrast. More machine than biological, their individual abilities have surpassed any individual human but at the cost of individuality and freedom, rendering them nearly-unstoppable monsters.
Cloning is also questioned as being outside of the natural order of humanity. When the Enterprise-D encounters a lost colony who survived being wiped out via repeated cloning and the abandonment of sexual reproduction altogether, little effort is made to preserve their new entirely asexual culture. They are simply told to reproduce as per the biologically mandated norm in order to survive.
There's a common thread to all of these cautionary tales: there is a 'correct' humanity that needs to be preserved. Star Trek has often been hailed as an optimistic counterpoint to the tendency of sci-fi to pick holes in future tech and create doomsday scenario- but the show is actually quite clear in that it's only optimistic because humanity doesn't try to change essential aspects of its physiology. Indeed, there is an ideal human and technology is only there to 'raise' differently abled people to that standard and no further. Deviation from the biological norm is heavily discouraged.
With this in mind, it suddenly becomes even more dire that LGBTQ+ representation is practically non-existent on Star Trek and 100% non-existent among humans in Star Trek. The lack of representation takes a darker turn: perhaps it is this very basic essentialist view of humanity that precludes the existence of LGBTQ+ people. It's clear that the writers of Star Trek generally held this view- after all they wrote all of the cautionary tales of deviating from the norm. It doesn't take too much of a stretch to assume that this is also how they viewed LGBTQ+ people- a deviation to be discouraged and not represented. It seems as though, to the writers, this lack of representation in humanity is not a bug- it's a feature.
Consider the cultures in Trek that exist outside of a cis hetero gender binary. The aforementioned clone colony from "Unnatural Selection", the agender species in "The Outcast", the three-sex species in "Cogenitor". They all have something in common: they're antagonists and their antagonism is directly related to the fact that Federation humans have a moral complaint related to what makes them different. In general, this complaint stems from the fact that these cultures engage in patriarchal actions, but twisted to fit the mold of their different sexuality. Is this a flipping of the narrative of the damage of the patriarchy or is this a defense of the correct cis hetero patriarchy? If there were an example of such a culture that was presented sympathetically, perhaps that question would be easier to answer.
But there lies the greatest disservice the Trek writers did to the show. They simply didn't present those stories. They didn't allow themselves to explore those margins of the human experience in a positive way. They took an essentialist stance- one that knew what 'humanity' was without question and treated everything else as inhuman- even if those features were something already found within humanity.
Picture mildly related.