A wok can produce a fierce stir-fry, but not every step belongs over fierce heat. When a recipe begins with whole spices in oil, that opening moment is about building fragrance without burning the ingredients before the meal has started.
Think of star anise or a piece of cinnamon in a braise. The spices need room in the cooking sequence, not a hurried addition to a smoking pan. The exact combination and timing should come from the dish you are cooking; adding every spice in the cupboard rarely makes the flavour more distinct.
Prepare the next move first
Measure the spices and set out the next ingredients before switching on the heat. Keep a suitable utensil nearby. If you have to leave the stove to peel ginger while the spices darken, the preparation order is working against you.
Use the recipe’s oil quantity and heat setting, then watch the pan rather than relying only on a timer. A pleasant fragrance is useful feedback; smoke and a harsh burnt smell are reasons to stop. Do not try to hide scorched spices under the rest of an expensive batch.
For a detailed example of controlled spice infusion, The Woks of Life’s chilli oil method explains how its authors adjust the heat while aromatics infuse. That method has its own temperature guidance and ingredients; it should not be treated as a universal timing chart for every stir-fry.
Whole and ground spices behave differently
A spoonful of ground spice is not a direct substitute for a whole piece at the same point in the cooking sequence. Follow a recipe written for the form you have, particularly when learning a dish. Make a note of substitutions so that you can interpret the result honestly.
Before serving, remove whole spices that the recipe tells you to discard. A small bowl beside the stove is a useful reminder. Good preparation should leave the flavour in the meal without leaving diners to discover a hard cinnamon fragment unexpectedly.

