I know there is already a similar question but focused on plastic sheds

My question is, I'm thinking of investing in a shed for my garden, but do I need to do any preparation or can I literally just start setting it up? I have an area in my garden that is most grass/mud and is a flat area, do I need to lay any foundations?

I would certainly use a foundation. However, keep in mind that if you live within city limits and/or a community with a homeowner's association, the types of sheds permitted, their locations and the requirement of a foundation or not and what type are often regulated by city ordinance or homeowners regulations.
–
BBlakeNov 2 '10 at 15:42

Wood in contact with the ground will always rot. Treated wood will do it slower. Depending on your climate, the shed might rot out in just a couple of years.

So yes, you need a foundation, but as @ChrisF notes, it can be simple.

Or if you live someplace like Tuscon and drainage is away from the shed, you might be able to get away without it, as the climate is dry enough the rot proceeds slowly enough that the shed will wear out for other reasons first.

Generally there are two types of shed bases suitable for a garden building, consider which is best for you. There's the concrete base or paving slab base. Many sheds come with a timber shed base foundation, but this needs to be laid on top of the concrete or slab base.