Britain spent most of the proceeds of 150 years of Empire, in exceess of 750m pounds, during the 4 years of the 1st World War. They were hammered during the Great Depression, and only survived as a solvent nation following WW2 due to loans from the US, which were paid off in 2006.
Nevertheless, Britain tried to maintain her Empire following WW2, however the Suez Crisis of 1956 showed that Britain was dependant on American good will. Ike threatened to tank the Pound if Britain didn't back down over Suez, which they did. During the 1960's the Wilson Labour Government declared that Britain would withdraw from all bases East of Suez, and completed the withdrawal by 1970.This process went hand in hand with the decolonisation process over the same period, which was largely (although by no means completely) peaceful, and done with the blessing of the British govt.
Britain wasn't brougt down by the desire to ramp up their social programmes. That came later. They were bankrupted for twice standing up to German agression the second time fighting for longer than any of the Allies in the ETO. Maintaining a global military force is expensive, and in the end, they could no longer afford to be an imperial power.