On the bright side, at least TOS was trying to push other social norms the right way, and they did some good. They didn’t get everything right but they got the ball rolling.
And on Trek: TNG started out with some pretty questionable episodes (especially the borderline racist planet), but it also gave us Measure of a Man, that reverse-sex planet with Riker, and introduced species like the Binars and that androgynous race which I tried to push some more boundaries. Then DS9 went ahead and gave us DAX, who I think in the early seasons did a good job kind of introducing some of the issues with identity that pertain to gender transitioning (I loved the Klingon approach: Dax, my old friend!).