You’d usually only find an S-bahn network (commuter train) in a big metropolis in Germany, but just outside Freiburg im Breisgau in the Black Forest, a small S-bahn network connects the medieval towns of the Kaiserstuhl hills.
https://www.theguardian.com/travel/2020/feb/07/rural-local-rail-routes-railway-lines-trains-europe-readers-tips
https://www.theguardian.com/travel/2020/feb/07/rural-local-rail-routes-railway-lines-trains-europe-readers-tips