Funfactlet: There's a steam locomotive in active duty shunting work trains around at the moment in western Germany. The Riedbahn between Frankfurt and Mannheim is currently being redone and they were short on Diesel engines, so one Verein for historic railroad equipment offered their steam engine and was accepted.
https://www.swr.de/swraktuell/radio/riedbahn-sanierung-dampf... (German only)
Another use for steam engines is for shunting duties in power plants - the engine has no boiler and just gets “charged” from the main plant steam generator.