In single payer systems, that’s determined by a body whose responsibility is to provide the most effective healthcare to all its citizens given a limited budget.
In the US, the monetary value of extending your life is proportional to the amount of money you spend on your health insurance (and appropriate actuarial tables).
Both systems have flaws.
In other countries, it’s often the health service itself that is paying.
Don’t get me wrong, I believe the single payer system is infinitely better, but for a small number of people, it will lead to worse healthcare outcomes.
A great book comparing eight national systems in The Healing of America by T.R. Reid. It references stats showing the French-style systems get the highest quality results, with reasonable cost. Japan and Germany have similar systems.