Just to fill in a bit on what's above . . .
Section 46(1) of the Public Health (Control of Disease) Act 1984 states: "It shall be the duty of a local authority to cause to be buried or cremated the body of any person who has died or been found dead in their area, in any case where it appears to the authority that no suitable arrangements for the disposal of the body have been or are being made otherwise than by the authority.
The foregoing applies irrespective of the wealth, or otherwise, of either the deceased or his/her family or friends. So if, for example, someone like Richard Branson was to die, his family would be perfectly entitled to turn to the local authority and say, "We're not arranging a funeral. You'll have to do it".
However, so that everyone doesn't simply hand over funeral arrangements to the relevant local authority, Section 46(5) of the Act enables the local authority to recover the costs of the funeral from the estate of the deceased. Importantly though, if there's not enough money in the estate to cover the full costs of the funeral, the local authority must bear the remainder of the costs themselves. (i.e. they can't send a bill to the relatives of the deceased although, of course, there's nothing to prevent them simply
asking for a contribution).
A local authority would normally choose cremation, rather than interment, simply because it's usually the cheaper option. However Section 46(3) of the Act states: "An authority shall not cause a body to be cremated . . . where they have reason to believe that cremation would be contrary to the wishes of the deceased"
Local authorities have a certain amount of discretion as to the way that they meet their legal obligations under such circumstances but the Government has laid down a code of good practice, which they will generally adhere to:
https://www.gov.uk/government/publications/public-health-funerals-good-practice-guidance/public-health-funerals-good-practice-guidance
It's important to note though that local authorities can only arrange a public health funeral 'from start to finish'. They can't take over any arrangements which have already been put in place by someone else.
See also here:
https://www.funeralguide.co.uk/help-resources/arranging-a-funeral/what-is-a-paupers-funeral-public-health-funerals-explained