Zest should generally be added towards the end of cooking to preserve its volatile oils and maximize its bright, citrusy flavor. Adding it too early can cause the flavor to dissipate.
Citrus zest contains essential oils that are responsible for its characteristic aroma and flavor. These oils are volatile, meaning they evaporate easily, especially when exposed to heat. If you add zest at the beginning of the cooking process, the heat will cause these oils to evaporate, resulting in a significantly diminished flavor in the final dish.
Adding zest towards the end of cooking, or even after the dish is removed from the heat, allows the oils to remain intact, providing a more intense and vibrant citrus flavor. This is particularly important in baked goods, sauces, and other dishes where the zest is intended to be a prominent flavor component. For example, in a lemon cake, adding the zest right before baking will result in a much more pronounced lemon flavor than adding it at the beginning. Similarly, in a sauce, stirring in the zest at the very end will give it a fresh, zesty kick.
There are some exceptions. For example, if you are making a citrus-infused oil or sugar, you might add the zest at the beginning to allow the flavors to infuse over a longer period. However, for most recipes, adding zest late in the process is the best way to preserve its flavor.
When zesting, avoid grating the white pith underneath the colored zest, as it is bitter and can negatively impact the flavor of your dish. Use a microplane or zester to remove only the outer layer of the citrus fruit.