We'll presume that the shed is heated; otherwise there would be no need for insulating the shed. If so, then you would simply install insulation in the ceiling that is less than the depth of the roof rafter.
For example, if it is a 2 x 6 roof rafter, then install 3 ½ inches of insulation when insulating the shed. The extra space above the insulation is needed for ventilation. If the shed has no ventilation then you should add some to the ridge and or soffits. If there is no soffit, you can purchase a drip edge vent which extends the edge of the roof by an inch or two and creates a very small overhang for ventilation.