The overwhelming majority of the billions sent to Ukraine is direct military and humanitarian aid, not cash. The cash that has been paid funds all kind of things to sustain daily life in the country: first responders, teachers, healthcare, housing for displaced people, etc. And yes it does help support pensions, because guess what, if those old pensioners don't get their money they will be homeless or starving, and die.