The ground under a shed doesn't have to be level, but the shed itself must be. When a shed has to be built on any slope or other uneven ground, some accommodation will have to be made to make sure the floor is level so the shed will be square and solid. How this is done will depend on how uneven the ground is, what type of soil it is, what water runoff and drainage factors may be involved and the type and weight of the shed.
Determine the degree of unevenness on the shed site. Drive stakes at all four corners of the shed location. Connect them with builder's twine, levelled between stakes with a line level. Measure the distance between the level line and the ground with a tape measure to find the degree of slope, whether the slope is in just one direction or if the site has multiple slopes, of varying degrees.
Solve modest slope problems by excavating a high side and building up the soil on a low side so foundation blocks are set with tops level. Use single solid concrete blocks on one side and double stack (or even triple stack) blocks on the other side to level the floor area. Solid blocks are 4 inches thick so a triple stack can adjust a slope of 8 inches from side to side. Level block tops with a long board and a level.
Use pier and beam construction for steeper slopes. Dig holes with a posthole digger, put in a base of gravel, then either make forms to pour concrete footings to an even height for the shed or use precast concrete piers, varying the gravel base so the tops are level. Build pier forms of wood or use purchased round forms of thick cardboard. Set wood beams on top of these piers to make a level foundation for a shed floor.
Move the shed location if the uneven site is an area of heavy water runoff. Never set a shed where it might act as a dam to build up water behind it or where a heavy flow might wash foundation support away. Elevate the floor above any uneven shed site so there is good drainage under it, whether it is a wood floor or metal. Once a level foundation is established, install either a metal kit shed or a wood shed built on site.