The cost to you of care delivered by a local authority or trust is determined by a Care Assessment, which takes into account what your needs are and the services required and then Means Testing, which looks at how much capital and income you have that can be taken into account to offset the cost to the provider.
National Insurance contributions go towards things like your State Pension but they don’t count towards the costs of social care. This type of care is managed by your local authority and generally comes at a price. That is why you have to apply directly to them if you need help with paying for long-term care. Your local authority (or Health and Social Care Trust in Northern Ireland) will first carry out a Care Needs Assessment to find out what support you need.