This actually applies to all ingredients you use for cooking: go for quality.
To cook delicious dishes, you don't need much, except good ingredients. (Okay, and perhaps some cooking skills and a little patience here and there).
The same goes for spices. In fact, good spices can elevate your dish to a whole new flavor level. And you often only need a spoon or a pinch of them.

Harvest date
The idea that you can store dried spices forever is a myth. You should actually use spices within two years of the harvest date. Quite difficult if the spices have already been on their way for two years ;-). So, check the harvest date. Is it not there? That's already a bad sign. This guideline applies mainly to ground spices; the unground variety can be stored a bit longer.
Certificates and/or mission
Unfortunately, quite a lot goes wrong in the spice trade. Underpaid farmers, child labor, destructive agriculture, to name a few. A Fairtrade or Rainforest Alliance certificate can already show that certain conditions have been met. If the brand values fair trade or sustainable agriculture, they will state that on the packaging. So, scan the label for this kind of information.
Single Origin
Just like with wine or coffee, the location where spices grow, the soil composition, and the climate all influence the taste of the spice. If the spices are Single Origin, it means they come from one place. This is a sign of quality. Often, harvests from different times and different origins are mixed for a consistent quality. However, that quality is usually mediocre.
Unground spices
The taste of spices actually consists of the aromas in the essential oils. These are released as soon as the spice is ground. From that moment on, the quality deteriorates. Some spices, such as cinnamon, ginger, or turmeric, cannot be ground at home. You need special equipment for that. But other spices, such as cumin seeds, coriander seeds, fennel seeds, cloves, and cardamom, can be used whole or ground at home with a mortar and pestle or spice grinder. If you have the chance: go for it! That makes a big difference in taste.
Origin of the spice
If the spice is not Single origin, check if you can at least find out which country (and preferably which region) it comes from. The more information (who harvested the spice? When? How did it get to the Netherlands? Which companies are involved in the chain?) you can find, the more transparent the chain and the higher the quality.
We hope this helps you! And remember: quality often costs a bit more, but it contributes to fairer trade and more sustainable agriculture. Moreover, quality also provides much more flavor, so you need less of it per dish. If you calculate it per meal, the price difference is not too bad at all!