Science is facing a major generational issue in the coming years, and it's all our fault.
For decades it's been the case that there are way more people interested in careers in science than there are permanent positions for them. There are a lot of undergrads, with some of them moving on to grad school. And some of those grad students will go on to take postdoctoral research positions, and some of the best and brightest postdocs will end up as distinguished members of faculty at respectable institutions.
It's set up almost like a competition. Each level is harder than the last and has higher rates of attrition. As you advance in your career the ranks of your colleagues grows ever thinner, but more competitive.
It's deliberately designed this way, under the assumption that everyone wants a career in science and that only the best and brightest and most ambitious and most willing to sacrifice will make it to the top. That the most capable will run the gauntlet in its entirety, and science as an institution secures for itself the best that humanity can offer.
All this works perfectly fine assuming that all the people that are coming into the program at the undergraduate level eventually want to end up as full professors at fancy-pants universities. For decades this assumption held true, but starting recently it simply isn't.
As the tools of science become ever more sophisticated, scientists are turning to advanced techniques like machine learning algorithms to sift through mountains of data to understand and explore the universe. And while for decades many of the sciences have produced their own homegrown computer scientists and programmers to run things, this is starting to become a bottleneck.
Many undergraduate students and even many graduate students are now more interested in, say, data science than physical science. And they join programs like astronomy or physics simply because it's fun and interesting, not because they want a long-term career in it. Their stated intentions when they sign up aren't to become a professor (with the long and arduous career, the lack of personal time, and the endless grading papers) but instead as a stepping stone to move into Silicon Valley or New York and forge ahead in a creative, challenging, interesting, and lucrative career.
A significant fraction of the best and brightest coming into graduate programs in the physical sciences simply aren't interested in the physical sciences long-term. And those will include some of the best and brightest and most ambitious and most clever and the best humanity has to offer.
And where does that lead the prospects of future progress in science?