The good news is that most people are covered by a form of healthcare system, so most of the time, the leg is ‘free’. For example, in the UK, the legs are given to you by the great NHS, so you don’t have to worry about the cost. The clinician at the NHS will prescribe you with the type of limb that you need, nothing less, nothing more.
Certain very high-end limbs you may have to pay for privately, by the NHS is beginning to also provide these for free.
This is another great reason to be very thankful for the NHS!
In places without systems like the NHS, like the US, the limbs are supplied via private health-care that each person has, so again, somehow free.