Besides affordability, more recent generations focusing more on career, quality of life, freedom, overall thrill- and experience-seeking, has led people to make lifestyle choices that do not involve children, as children can be a hindrance to some of those lifestyle choices. Because of those choices, many of these same people simply don't value children [of their own] as much and thus have fewer or none at all. Career aspirations, increasing wealth/income, and keeping a majority control over one's time and obligations has become more important than accepting the stresses and challenges of raising one's own family, even when considering the special kind of joy that also arises from pursuing that endeavor.
Adding onto that, say what you will about organized religions, but the increasing level of secularism is perhaps also a factor in leading to a declining birthrate, as most organized religions tend to "bake in" a kind of enthusiasm and social "nudging" to have more children.