It will take you 5 minutes to compile (1) Table 1-1 from https://ncses.nsf.gov/surveys/earned-doctorates/2023 and (2) https://nces.ed.gov/programs/digest/d16/tables/dt16_101.10.a... to see that we produce science PhDs at the same rate we have for decades when normalizing for population. From there, I guess it comes down to considerations of whether the amount of scientific and engineering work as a proportion of total work modern societies need and/or do is going down or not, then whether we expect it should scale with population and/or societal advancement.
Considering the growing complexity of technology, number of productive fields, incoming crises our species faces while we simultaneously turn to more ambitious goals, and the amount of international students doing PhDs, one might actually think we underproduce scientists. Far, far, far more MBAs graduate every year than PhDs.