A whole spice is a locked box. The aromatics live in volatile oils held inside the seed or pod, and they will happily sit there for a year doing very little until you apply heat. There are two ways to turn the key: toasting dry, and blooming in fat.
Toast when you plan to grind. A dry pan on medium, a constant shuffle, and you pull the spices the moment they smell like themselves and a shade darker. Cumin, coriander and fennel love this. Grind while warm.
Bloom when the spice will stay whole in a dish. Warm oil or ghee, add mustard seed, cumin, curry leaf or dried chilli, and let them crackle for a few seconds before the onions go in. The fat carries the flavour everywhere the dish goes.
The mistake is treating them the same. Bloom a delicate ground spice and it scorches; toast something you meant to fry and you have done half the work twice. Match the technique to the destination.

