Using a population pyramid graph [0]. You can see the data in [1].
It's a nice way to visualize the amount of working aged people vs dependents (youth and elderly).
In short, a bulge of working age people ("demographic dividend") is good for the economy in the short-term, but unsustainable. The 'baby boomer' generation was one such demographic dividend.
China talks about the '4-2-1 problem' (1 child needs to pay for living costs for their 2 parents and 4 grandparents). If you search for that term you can come across lots of articles.
Interstingly, what is ideal depends on the type of economy: in developed economies closer to retirement is supposedly the most economically productive period of ones life (eg, information workers), but in less developed economies youth is the most productive period (eg, labor workers in factories).
[0] https://en.wikipedia.org/wiki/Population_pyramid
[1] https://www.populationpyramid.net/united-states-of-america/2...