The timber should be ok as long as it’s from a half respectable seller. Depending on the quality of a pre made shed I’d suspect the roof covering may end up being the weak point. All mineral felts are not made equal for example. Epdm rubber roofs are gaining ground on felt as it can be sourced in bigger sheets helping to eliminate seams that end up leaking.
If you DIY, go above and beyond with things like sealing cut ends, pre drilling so you don’t split the grain apart etc. Tanalised is great but as soon as you compromise the outer layer it’s just a matter of time, no matter how good the timber was to begin with.
Try to plan ahead with your design, you may be able to make it so that the worst spots for rot are easy and cheap enough to replace.
Don’t scrimp on the timber treatments. I’ve found the cheaper options are usually a false economy. Do it right once and you’ll be able to spend more time enjoying it and less time repainting.
Like Nick says, ventilation is key. Try get some up at roof level and some lower down as far away as feasible. The temperature difference between the two will help drag air across the shed keeping it reasonably dry.