Many spices gain, change or lose taste when heat-treated. You must know given spice and when to add it.
Fresh dill or parsley leaves, after a hour of simmering are worthless, losing all aroma. Add at the very end of cooking.
Black pepper changes its taste and loses spiciness under heat. You can add it twice, the pepper added early contributing completely differently than added late.
Paprika doesn’t change much over first few hours, so it really doesn’t matter – unless you leave it in slow cooker for 8+ hours. It will turn acrid and unpleasant.
Fresh garlic is entirely different than garlic that underwent even several minutes of heat treatment – and garlic that was heat-processed, in order, doesn’t change much in time, but infuses other products, so your choices are between fresh (sharp, spicy taste), thickly chopped cooked shortly (strong nodes of garlic taste, as ingredient, not spice) or boiled long (the taste infusing the food.)
Salt doesn’t change taste over time (although it may infuse foods deeper) but affects many processes. Water boils at higher temperature, resulting in pasta or potatoes cooked better; some meats get much harder so it should be added late; vegetables go soft very fast and “drop” resulting in more evenly distributed frying heat (so salt fried veggies early)…
Cumin fried on clean, dry pan (no oil) in high temperature gets a significantly different, very strong, pleasant aroma. You won’t obtain it by normal boiling or frying with other foodstuffs, no matter how long, as this requires higher temperatures than others. Fry it first, and only add other ingredients when it’s ready.
Each spice has its caveats concerning adding time. Sometimes you need to add them at the very end – especially fresh herbs. In other cases (like salt) the time depends on the foodstuffs – early for vegetables, late for meats.