Yeah it's a bit of both but there's quite some societies which were educated and turned uncivilized or where you have an educated elite that's not really civilized/interested in civilising. Meanwhile pretty much all civilized populations end up educating people,I don't think I've seen a counter example.
It's a lot easier to educate a decent portion of society than create a society that's civilized as a whole. And I think the latter is more important for keeping things running long term which is grim.
Educated people make societies more civilized, and they in turn invest to educate more people.
Unless there's a catastrophe. In that case all bets are off.