i just checked and aparently it was Jóhanna Sigurðardóttir of iceland in 2013, altho technically they were prime minister, not president. the first president would have been Edgars Rinkēvičs in 2023... which is after trumps first presidency.
of course these are only the first openly gay ones. while looking into this i saw that james buchanas in 1844 was the first known gay us president, altho they were closeted. still, they are beating trump in that competition.
altho iirc clinton was a presiden as well? so if trump gave clinton head, then clinton was a gay president before trump... unless its not gay to receive head?
the list of openly gay heads of states is really short btw and well... only starts in 2013. im no one for girlbossing, but this is both quite sad and a positive sign for increasing queer acceptance. let's hope with gay president trump this will get even better
https://en.wikipedia.org/wiki/List_of_openly_LGBTQ_heads_of_state_and_government