A taxonomy answers "what kind of thing is this?" It arranges concepts in a tree — parent, child, sibling. It is simple, useful, and limited to hierarchy.
An ontology answers more. Beyond hierarchy, it captures relationships like "depends on," "produces," or "supports," and it can enforce rules about them. That extra structure is what lets software infer new facts and trace how one concept connects to another.
In short: every ontology contains taxonomy, but a taxonomy alone cannot express the web of relationships an ontology can.