https://en.m.wikipedia.org/wiki/Aeolipile
Most likely the reason it remained a toy, rather than being put to productive use, was the abundance of slave labor.
This is something that get said a lot, but it misses technological and socio-ebergetic factors as well:
1. at that time metallurgy was very rudimentary, compared to how it was in the late 18th century. Most they wouldn't have been able to craft an efficient steam machine back then even if they tried very hard.
2. They also didn't use coal (I don't even know I'd they knew it), which makes fuel (wood) really expensive and also removes the self-reinforcing retroaction where you can use the steam machine to mine more coal and really contributed to the exponential nature of the industrial revolution.
The whole digging and drilling business, though - that's something else entirely.
A fun fact is that the reason we developed the metallurgy required to put high pressure gasses to work inside cylinders was in large part due to work on improving cannon manufacture.
Early cannons exploded a lot, but a cannon which occasionally explodes is a lot better at being a cannon than a steam engine that occasionally explodes is at being a steam engine. Having a "minimal viable product" for a cannon is much simpler than for a steam engine so they were able to iterate on the technology.