It's a complex set of systems. This is my understanding based on experience.
Attendance allowance comes via DWP, is paid a 2 levels, is not means tested, and gives some support to help people live independently rather than in care home. It is independent of anything else and can continue even if you are self funding some of your care in a home, but ends if you get continuing care from the NHS.
Support for care at home or care home costs comes via the local authority and is means tested. The value of the house is taken into account unless there is someone else living in it. If the house is relevant, the LA can put a statutory charge on it and get some money back when the house is sold. Someone in nursing home might need nursing plus care, so the NHS pay that bit but the so called hotel costs are means tested via the LA. That is often the biggest bit.
Continuing care is funded by the NHS and covers everything. It really is for people who would otherwise be in hospital.
Example, the in laws, limited income getting poorly, mobility etc. For some time they had attendance allowance which they could spend as they wanted, around £45 pw. It let them pay for a cleaner, who also did the shopping, a few hours a week.
FIL had a stroke, serious and couldn't go home. Means tested help with nursing home fees, he had to pay a lot, although the nursing element was paid by the NHS. MIL got some help with home carers because at that point they were 2 people not one household, FIL pension was assigned to his income and set against his care home fees. When she died, the house was deemed to be an asset in FIL means test so his LA support ended.
At the very end, 6 years on, he was barely conscious and could have been admitted to hospital. The excellent nursing home was able to care for him and has all the right certifications so the NHS paid continuing care, all of it, for a few weeks.
It's a quagmire and no single organisation is in charge. The local authority adult social care should be the 'pivot' and facilitator but they are so overstretched and staff change quickly so it's not always effective. Some charities, like age concern or CAB are a good starting point. Or the local authority who do have a statutory duty.
Normally when someone is discharged from a long hospital stay the hospital does a discharge assessment which begins some of these processes, but its all a lot more complicated than it needs to be.
That's just the funding, you also have to arrange the care. Its all via private providers, most of which are really struggling to recruit.
A final thought, the utility providers like electricity can put a flag on someone's account to say they are vulnerable. That should stop them cutting people off if they pay the bill late and should stop sales calls etc. Not sure if it works as well as it should.
I hope it all works out well.