Anarchy is about rulers, anarchists are fine with coming up with agreement and with delegating tasks to other people.
"Hierarchy" comes from "heira", which means "sacred rites". So it's "the rites which rule". In other words, "the process through which people are organized to do things"
To make it nice and confusing, "anarchism" has been applied to so many systems of beliefs over the years that it has no clear meaning on its own. To some people, it absolutely means "no structure whatsoever".
Etymology.com links:
hierarchy: https://www.etymonline.com/word/hierarchy anarchy: https://www.etymonline.com/word/anarchy