In his memoirs Tony Blair wrote that, when he entered No10 as Prime Minister, he had never held office before and in fact being PM was the only job he would ever hold in Government. Similarly the only post David Cameron ever occupied was that of PM.
Admittedly they were exceptions but lack of ministerial experience was certainly no bar to their holding the top job between them for 16 years. What was crucial was the quality of the support around them whether from political special advisers or the civil service. I was at a recent event with Theresa May who was asked what it was like taking on such a lonely and demanding job as PM. She immediately praised the quality of the civil service around her, a compliment that her successor signally failed to do.