Preheat the oven to 350°F (175°C) and line two baking sheets with parchment paper.
Grate the zucchini and squeeze out as much excess moisture as possible using a clean kitchen towel or cheesecloth.
In a medium bowl, whisk together the flour, baking soda, baking powder, salt, cinnamon, and nutmeg.
In a large bowl, beat the softened butter, brown sugar, and granulated sugar until light and fluffy.
Add the egg and vanilla extract, mixing until fully combined.
Gradually stir the dry ingredients into the wet ingredients until just combined.
Fold in the grated zucchini and chocolate chips (or raisins).
Drop rounded tablespoons of dough onto the prepared baking sheets, spacing them about 2 inches apart.
Bake for 10–12 minutes, or until the edges are lightly golden and the centers are set.
Cool on the baking sheet for 5 minutes before transferring to a wire rack.
If desired, whisk together the glaze ingredients and drizzle over the cooled cookies.