What if the humanity became infertile?

The Importance of the Afterlife. Seriously

I get the point Samuel Scheffler makes about humanity losing purpose if "the earth and all its inhabitants would be destroyed 30 days after your death". But his other thought experiment is more puzzling:
In Ms. James’s novel, humanity has become infertile, with no recorded birth having occurred in over 25 years. Imagine that you found yourself living in such circumstances. Nobody now alive is younger than 25, and the disappearance of the human race is imminent as an aging population inexorably fades away. How would you react?
As in the case of the asteroidal collision, many activities would begin to seem pointless under these conditions: cancer research, seismic safety efforts, social and political activism and so on.
My wild guess would be that on the contrary a large number of humans would on start working tirelessly to ensure that they live longer (if possible "forever"), which would entail very quickly finding a cure for cancer and other ailments, and work even harder on safety. Knowing that you don't have offsprings means that your own life and that of your peers already born is even more important to preserve. This would also maybe work against the "after me, the deluge" attitude: if you know you will be around for a long time, you might make better decisions as those are more likely to affect you.