Well considering the topic and I'm an asexual trans woman whose also post Orchiectomy... Regardless if it's on the basis of biological sex, or my gender... The species would be doomed, but that would be true even if I weren't infertile.
That however gives me a striking advantage in this nightmare situation, for one the ability to relate to women would be invaluable, for two I'd be the only one not hysterical with panic over potential extinction. Assuming there are any tissue, genetic, or sperm samples remaining by this point I'd be in the best position to direct human efforts in restoration of the species. Which in my case would translate to a massive genetic engineering project, development of tank breeding(so regardless of sex in the future, everyone can have blood related kidsm even if they're sterile/barren), erasure of the regressive concepts of masculinity, and an eventual unified path for humanity. The end result would be having a fresh generation of both biological males and females from samples far flung in origin, who aren't bogged with gender politics. The result would allow gender and physilogical sex to be less constraining, while allowing easier default based on gender identity, rather than plumbing. Tank breeding would remove the physical burdens for both sexes, plus it'd allow for more communal family structures, reducing strain on parents in absolute terms. Which would allow gender identity, expression, role, and sexuality to become fluid. This would allow people the most bodily and personal autonomy and agency, which would ultimately lead to a more peaceful species. Genetic engineering would allow breeding of people who are better suited to hostile environments, while also being an artificial means of expanding genetic diversity.
After the breeding project is in full effect and society stabilizes, then we're cooking with gas... With less effort needed for breeding and child rearing, I'd put a massive focus on establishing human colonies in orbital space colonies, on whatever we can terraform in this solar system, and on planets in other star systems. Less as a measure to combat over population, more to ensure the species never faces the catastrophe that wiped out an entire gender and threatened to doom the species.