This Slate article about demographics is a relatively good take on the topic, apart from perhaps excess pessimism about a possible population shrinkage.
It eschews a common mistake, where people think that modern societies have dramatically lower birth rates than in the pre-technological era, sometimes arguing some moral implications out of that. While it is trivially true if you look at gross numbers, it is also misleading, and ceases to be true when looking at birth rates in net terms, the number of children who reach childbearing age per women, which is a much more useful metric to understand demographic trends.
In net terms, we have merely moved, as noted in the article “from high death rates and high birthrates to low death rates and low birthrates”, that is pretty similar net rates. Without knowing the exact numbers, it can trivially be inferred from the fact that humanity grew pretty slowly for millenia, if at all during some periods and geographies, that the net rate has been between 1 and 3, and rarely much above 2 during humanity’s almost entire existence. Net rate bumps where healthcare was improved rather suddenly and before the rest of a developed economy’s features arrived, as happened in the late twentieth century in some developing countries, are a short lived historical anomaly.
It does seem that people adapt to the available technology to get to a rate within sustainable boundaries (there is evidence, for instance in medieval and renaissance Europe, that people were already actively operating below the then available capacity). Given that it seems pretty universal and not dependent much on local culture, historical time, or on the degree of technological development, one can ponder why is it so? Do resources constraint or some other perennial equilibrium forces play a role, or is it just a curiously persistent coincidence?