Since when did bring a nerd or nerdy make you gay?

So I was watching a tv show and the shows takes place in the 70s-80s there’s this group of friends that are basically nerds. And at every turn in the show one character or another will make it a point yo allude or straight up call one of the characters gay cause their nerdy. But this usher the first time I’ve seen this two subjects correlated in tv shows or Movies. Even in modern times/real life I’ve seen and heard similar connotations. Although to a far lesser extent but I just don’t get the correlation, especially in the show I’m watching either they are foreshadowing one of the character is gay or people have a serious hatred for people into nerdy things which I really don’t get.
Since when did bring a nerd or nerdy make you gay?
Post Opinion