The theory is that categories are a taxonomy and tags a folksonomy. Taxonomies can be hierarchical, but folksonomies are, by definition, flat. However, in practice, tags almost always have an implicit hierarchy, which is also what research on folksonomies in the wild tends to find.

— Lea Verou, Rethinking Categorization, 2023

Well expressed, and the first I recall hearing of ‘folksonomy’, a useful distinction.