One common mode is a close representation of a particular prototype in a specific time in it's life. That time may be as broad as a particular decade or as specific as a single date. Some consider this the easiest way to model. There is usually an ample amount of research material to allow the modeler to accurately represent the chosen railroad. Depending on the time period chosen that research could even include personal observation. The largest challenge might be the selective compression used to reduce vast amounts of space and miles of right of way into the limits of the room walls. An edge of a town or crop field might represent something much larger in the distance of the backdrop. A visual block, interupting the view of the railroad could fill the many miles between towns.
The other end of the spectrum is the fantasy railroad. It may be placed in a general geography of the type of scenery you like to model (or look at, if you haven't done enough modeling to make that commitment). The towns can be named after friends and family. The railroad can be named after a geographic feature. It's all up to the imagination; but perhaps difficult because of the additional work involved. Maybe that gets a little jump-start by finding the child in our selves. (That space under the Christmas tree was neither Pennsylvania nor the Southern Pacific, it was our own personal world.)
Somewhere in the middle is the story telling that starts with a prototype and rewrites history. A short line railroad didn't fail but expanded into new territory and modernized enough to add diesels to it's roster. Steam stayed viable longer; or your railroad hosts rail-fan trips with restored steam running along with modern engines. Electrics became more common ahead of newer cars. (Hey, it works in Europe.)
Which brings this to some of the choices I made and another important consideration with a lot of influence on both the place and time setting for the model railroad. In Z scale, there is still somewhat limited choices available for engines and cars and the railroads they represent. The choice is growing fast as the scale gets more recognition and a larger following but it's still behind HO and N for variety.
As mentioned relative to the "need" for a roundhouse, I like steam. That sets a limit (extendable with some historic rewrite) on the time period. But the choice of steam locomotives is enlarged by looking to European prototypes. Deciding on a European (in particular, German) prototype has both advantages and drawbacks.