I think initially there was a direct relationship between NI and NHS/care/pensions but googling hasn't helped me find a "when"
I'm not sure how there could have been as the Welfare State started from a base of £0, so for a long time there would have been a population with a backlog of poverty and illness, with just a trickle of contributions coming in to pay for them. The concept may well have been that each generation would pay for the one before, but it will always have been playing catch-up. The current generation of pensioners includes 'baby boomers' of which there were (obviously) high numbers, so they/we have paid in in greater numbers.
I think the narrative that 'we' can't afford to pay the people who have paid in is false, but it suits politicians to have us believe it rather than to question their mismanagement of the system. There was money 'in the pot' to pay furlough at much higher rates than pensions, not to mention the other spending during Covid.
I agree that in many cases young people have lower pay so pay less in (although wages were also low in the 60s and 70s when many current pensioners were earning), but they are being told that it is they who are paying for pensioners and that pensions should be cut to 'be fair' to the young. Some of the venom on the subject of 'Boomers' on MN is disturbing. It's a useful narrative for a government that wants to roll back the welfare state, though.
Having said that, many posters on MN claim to be earning well over £100k pa in their 30s, in jobs that give them time to post on the Internet all day, so. . .