Oh my. Hans Christian Andersen wrote the Little Mermaid, as a love letter, to express his emotions upon hearing that the man he loved, Edvard Collins, was marrying – a woman.
In the fairy tale, the Little Mermaid represents Hans Christian Anderson, the man whose love was not returned. The Little Mermaid’s desire to be a human, is Hans Christian Andersen’s impossible desire to be a woman. Like the Little Mermaid, Hans Christian Andersen had a high soprano singing voice. In fact, as a young man there was so much speculation as to whether Andersen was a boy or a girl, a group of bullies pinned him down and pulled off his clothes to find out.
Anderson’s Ugly Duckling was also autobiographical. Andersen was very tall, gangly and by all accounts “ugly”.
During his life, Hans Christian Andersen wrote more than 160 fairy tales, that have been translated into 120 languages. Andersen loved men and women, including men of royalty, but he never married and died, very much alone.
Here is a good introduction to Hans Christian Andersen
https://archive.nytimes.com/www.nytimes.com/books/01/05/20/reviews/010520.20allent.html