But that still doesn’t explain why. Hero of Alexandria created a rudimentary contraption that was an obvious predecessor to the steam engine nearly 2000 years before the invention of the steam engine. Why did it take two millennia to build upon his ideas?
Education levels were low and the population was much lower, essentially everybody lived in poverty, the scientific method hadn't been adopted and people in general did a very poor job separating religion/superstition with the workings of the natural world. Also information travelled slowly/not at all, and books were very expensive - so in the case of the steam engine, only very few people probably ever even heard about the engine after Hero's death for many hundreds of years.
There are tons of reasons. Really the past 250 years have been the extreme exception to the more "normal" state - it might be more appropriate to ask what we did in this time that changed things so much
Because even though he invented a basic steam engine they still didn't have nearly the material science we do. Their engines wasn't able to create and safely contain enough pressure to do anything useful.