When towns in this place and era were being planned, it was in conjunction with the railroad. A "railroad town" was not for railroad workers. They had their own camps for the few months they needed to be nearby, then they moved on.
The town started with farmers. The bread and butter (literally!) of the town. The American government designated areas where they had taken land from those who already lived there and had treaties in place to enforce it (entire books have been written about the ethics and logistics of this). They chose the path of the railroad and decided on where towns would be. The main towns were on the railroad line and would have a station.
So farmers (and/or ranchers, depending on the climate) came in, picked a plot, registered it with the local government office, and set up a claim with a shanty. This could be single men (and sometimes women), entire families, or the father of a family who would bring in the rest of the family shortly.
None of these towns was ever just a junction point. They were all designed to be living breathing towns, with the advantage of being on a railroad line.
Most people were farmers and they could sell excess crops, animals, etc. The railroad brought them seeds (they'd mostly save their own, but not always) and tools. Any resident could order from the Sears Roebuck Co. (though not until 1886, slightly after your time period). Tools of all sorts, household goods, even ready-to-build houses (plans starting in 1895, full kits 1908-1940).
In those earlier years, the trains would bring lumber (if there wasn't a large local supply) and other building materials like nails, tools, glass. If a town had a natural resource (including from surrounding towns not on the train line), they could export it.
Most importantly, the train brought people. New settlers, visitors, and it allowed townspeople to go off in search of seasonal work, visit family, attend specialty schools and so on.
Traveling by covered wagon was grueling. Even on established trails, 10-20 miles a day was common. Solo travelers or coaches on (mostly) good roads, with just passengers and luggage, might cover more distance. In one report from 1861, an 80 mile trip took 17 hours.
1860-era trains on good tracks (near older, bigger, cities) could go 60 MPH, but 20 MPH was a lot more common out west. Trains could travel overnight and sleeping cars became available during this era too. So in 24 hours, one could go around 480 miles.
Before the trains, there were still large towns out west but they might be more spread out. Train stations encouraged settlement.
Only a few workers were needed for the actual trains. A station master and a couple employees. Train maintenance was done elsewhere, though there would be people and equipment for emergency train and track work.
The post office is connected with the train, though existed without it too. Letters, packages, and notification of huge deliveries might come through there.
The telegraph office is also connected with the train and did not exist before the train (the telegraph lines were along the train tracks and set up at the same time). This was the fastest method of communication.
So add in a handful of employees for post and telegraph. More if you had home delivery.
So imagine all the professions/industry of an 1860's town:
- Farmer & seasonal farm hands
- Stores of various types (general goods, fabric, tools/supplies)
- Lumberyard and builders/craftspeople
- Sometimes a local industry like weaving or paper making.
- Granary, flour mill
- Silage and animal feed storage
- Medical (both for humans and animals, plus dentists and eye doctors)
- Religious personnel (when the towns were set up, the major churches would assign pastors to towns and church-raising was one of the early tasks)
- Bars and sometimes restaurants
- Seamstresses/Tailors (especially in towns that had a lot of single men)
- Home helpers (children who would help households out with childcare, cleaning, misc tasks, usually gender segregated)
- Town administration (mayor, etc).
- Law enforcement
And so on. This is not meant to be an exhaustive list.
I strongly suggest the excellent Little House book series, written by Laura Ingalls Wilder, who lived through these very events as a child. The books are written for children and much of the "inappropriate" material is missing or hinted at. Plus Wilder's daughter edited the books to be more interesting to readers, so a few facts aren't quite right. But the basic history is sound and it's very illuminating. (Don't watch the TV show as a substitute, it is not historically accurate.)
By the Shores of Silver Lake is the book with the town springing up around the train station, though trains also figure in later books and I would read them as well.