The problem right now is that the baby boomers are retiring, but are still to young to die. In Germany the baby boom was between 1955-69. So with the current retirement age of 67, that means that they started retiring in 2022 and it will end in 2036. With a life expectancy of about 80 in Germany, 2035 is also, when they really start to die. Retirement is really the big cost factor of the welfare state, so this is an actual problem.
However many will choose to retire a bit earlier using savings or some laws, which allow one to retire four years earlier, for lower pensions, if one for fills certain criteria.
This obviously increases costs and hurts the economy as fewer people are working. However the ration will start to improve in a decade or so and there are other reasons for the economy doing poorly, such as the transition to EVs.