Something similar to this: https://en.wikipedia.org/wiki/Oscillating_cylinder_steam_eng...
And you can still get them reasonably inexpensively: https://www.aliexpress.com/item/1005007964198565.html
I bought one for a friend's 5 year old a while back and became BEST UNCLE EVER!
The run well on compressed air (like an electric car tyre inflator or small air compressor), or for a bit more high temperature danger they run great attached to the steam wand of an espresso machine. When I was a kid dad built me a steam boiler out of a steal aerosol can and some copper tubing with a folded brass sheetmetal alcohol burner. That's not a 5 year old friendly thing though, from memory I'd have been maybe 10 or 12 when he started letting my light alcohol on fire in that garage or backyard. (Modern parenting may disapprove...)