Assume in the very near future almost all rail transportation would return to steam-powered locomotives. To define it exactly, I mean solid fuel is burned inside the locomotive, which boils water, which is in turn used to drive the locomotive.
Assume no economic or societal collapse, or at least not a too large one. Also assume that the importance of rail transport versus road transport increases to the levels it was 70-90 years ago. Technology should be the same as we have now.
Steam locomotives are not very efficient, but there might be some causes in their re-emergence. For example, rising oil prices would make road travel uneconomical for goods and only affordable for personal travel to the wealthy, just like it was 70-90 years ago. Or some regulations would be the cause of this. Whatever the reason, steam locomotives are coming back.
(I know that this would explain the reduction in diesel locomotives, but not electrical ones, which can be powered by wind/solar/nuclear power. Maybe something like a new plant which grows fast, easy to harvest, and burns well, perfect for steam locomotives but not economical for power plants? I know, getting rid of electrified rail would not be easy, this might require some suspension of disbelief. But somehow, they are either gone, or reduced to niche roles)
Now, steam locomotives are back, while technology is roughly the current one. What would they look like?
Steam locomotives, especially 20th century ones, are real marvels of engineering, more than 100 years of development led them to be much faster and more efficient than when they were first invented. This knowledge is not lost to us, so we don't have to start from scratch. Many old steam locomotives still exist in functional states with people able to maintain and operate them, either for tourism, or in reserve for emergencies. So, putting the 1930-1940's steam locomotives (the last time significant development was done in this regard) back in production should not be that difficult. But how could we improve them?
One significant change (but invisible from the outside), I guess, would be the computerization of the controls, to make them simpler to operate. Driving a steam locomotive was a very difficult job, and required great wisdom. It's no wonder the word "engineer" originally meant a train driver. Even the job of the person shoveling coal required a lot of knowledge and experience, keeping track of steam pressure, temperature, humidity, the color of the smoke, to know when to shovel fuel and when to release pressure, etc. Everything was done manually, so some improvement could be done there.
What else? Fuel efficiency? What could we do now what they couldn't do 70 years ago? Computer simulations to make a better shape for the boiler to improve efficiency a little? Better steel technology to resist higher pressures? Better filters to not produce that much smoke?
What would visibly change as steam locomotives would be kept improving from where they were left 70 years ago? Steam turbines are more efficient then traditional steam engines, every power plant, including nuclear ones, use highly sophisticated steam turbines. However, they tried it for locomotives, and it was not very successful.