Why is early speculative fiction so grim? One reason is that early SF authors thought the sun was on the brink of death.
https://www.typebarmagazine.com/2024/03/24/science-fiction-and-the-death-of-the-sun/
@estherschindler: Many felt dreadfully uncertain about the Earth's and Humanity's place in this new and uncertain universe. Existential dread was real.