An herb is a leaf or other green part of the plant. Any other element of the plant would be considered a spice including dried bark, the roots, a berry, seeds, or twigs.
Herbs are plants with fragrant or aromatic properties. Herbs can be used to flavor food, included in fragrances, and even a part of natural medicines. Basil, parsley, rosemary, thyme, and dill are all examples of herbs.
Spices are primarily used for flavoring, coloring or preserving food. Many spices have antimicrobial properties. Cardamom, cinnamon, allspice, cloves, nutmeg, pepper, turmeric, ginger, mace, saffron, vanilla, cumin, dill seed are all examples of spices.
I love thekitchn website because it gives you a “Guide to Every Herb and Spice in the Cupboard.”