In short, Britain consumed too much and invested too little. It also had some especially self-destructive and toxic leaders in the unions that harmed British industry.
Avoid nationalization of most industries. There may be a few - say railroads or the NHS - where government control could be justified, or at least not endanger the economy.
Abandon the pretense of being a great power at least temporarily. Britain cannot afford the expenditure and the results on its balance of payment. To get foreign currency to compensate temporarily, Britain did things that ate its seed corn and impaired its future economy.
Spend American aid to get new machine tooling and other capital plant like the Germans did instead of consumer goods or paying for overseas deployment (given British Cold War commitments, this will be hard to do). The aging capital tooling of British manufacture greatly impaired British quality and competitiveness once West Germany and others were rebuilt.
Prevent British unions from having so much political power. British firms were managed poorly as a result of so much union influence. Managers were making decisions based on politics (what the government wanted them to do) rather than the marketplace (reinvest in their industries to ensure future competitiveness). The industrial strife caused by British unions was just toxic.
Recognize the future is with Europe and not the Commonwealth. Join the ECSC (forerunner of the EU) early on. If they were original members, they'd be more likely to fashion EC policy in ways more favorable to it than waiting until 1973.
The problems of the 1970s were simply the fruits that arose from the seeds planted in the 1940s. Britain's problems were hidden because the temporary decline of its continental European competitors allowed Britain to appear strong. Once those countries recovered and began competing, the failure of British industries became apparent. Atlee's government was very successful in accomplishing its goals - many of those goals were not the right thing to do though. The Tories failed to provide a rival vision and didn't reverse enough Labor policies. Labor then proceeded with more follies in the 1960s and 1970s with their pursuit of industrial planning.
I can't believe there are people here who think the problem was Thatcherism. Note to people - what Thatcher did in the 1980s does not explain the decline of Britain from 1945 to 1979. By the time Thatcher came into power, the British economy had become a joke. Its technical lead had disappeared. British quality was an oxymoron. Once great British companies were pitiful shells of what they once were. British economy went from largest to Europe to falling behind Germany (early sixties), then France (mid sixties), and briefly by Italy (in 1987) before Thatcherite policies finally reversed the decline (just as it takes time for bad policies to become noticeable, it also takes time for reforms to achieve their effect). Manipulate statistics all you want - you can't hide from that.