Herbs and spices can go bad. Basically, they just get old and lose their flavor.
You don’t have to taste to tell. They won’t have a very strong smell anymore either.
But there are ways to help you get more from your spices.
The most obvious way is buy your spices in smaller amounts, so they will always be fresh.
But, you can do other things such as:
Storing your spices away from heat and light. Keep them in a cupboard or a spice rack with doors.
Buy a larger jar of spices, but only keep a small amount out. Store the rest in the freezer.
If possible, buy whole nutmeg, cinnamon chunks, peppercorns,cumin seeds, etc. and grind them. Whole spices will keep longer than ground.
Just pick up a coffee grinder and use it just for grinding spices.