The "room" is the Hail Mary , a starship traveling at relativistic speeds toward the Tau Ceti solar system, 12 light-years from Earth. Grace piecemeal remembers the "Astrophage" crisis: a mysterious, solar-absorbing microorganism has been detected in the sun’s atmosphere. The microbe feeds on energy, cooling the sun at an alarming rate. Simultaneously, Venus’s atmosphere is showing the same cooling signature. If left unchecked, Earth will enter an ice age within decades, rendering humanity extinct.
Overall, "Project Hail Mary" is a thought-provoking and entertaining science fiction novel that explores themes of survival, memory, and the potential of science and technology to solve humanity's problems.
But here is the twist Weir lands perfectly: Grace doesn’t die. He survives for decades on Rocky’s planet, living among the Eridians, teaching their children physics. The final scene is a flash-forward. Grace is an old man, happily retired on a planet of spider-aliens, basking in the warmth of a restored sun. He receives a message from Earth: "We got your data. We’re coming to get you. One more trip home?"
When Grace makes the final choice to save Rocky instead of returning to Earth with the solution, he completes his arc. The coward who refused to leave his planet becomes the man who refuses to leave his friend. He chooses certain isolation (Erid is a lightless, high-gravity, hellish world for a human) over probable heroism. He abandons Earth. He abandons his species. He saves one spider.