These ingredients can be used to provide both seasoning and flavoring. Seasoning means to bring out or intensify the natural flavor of the food without changing it. Seasonings are usually added near the end of the cooking period. Flavoring refers to something that changes or modifies the original flavor of the food.
Garlic isn't usually the main character (with some exceptions), where we might talk about the main character's flavor profile and the right blend of aromatics, seasonings, and spices to bring about some specific transformation in taste. Garlic is both vegetable and spice, depending on how it's used.