Preheat and Prep Pans: Preheat oven to 350°F (175°C). Line two baking sheets with parchment paper or silicone baking mats.
Prepare Zucchini or Squash: With the small size grater, grate zucchini or squash and wrap in a kitchen towel or cheesecloth. Squeeze out excess liquid until dry, measure out 1 1/2 cups or 180g. Set aside.
Mix Dry Ingredients: In a medium bowl, whisk flour, baking soda, baking powder, salt, cinnamon, and nutmeg. Mix Wet and Dry Ingredients: Gradually add to wet mixture, mixing until just combined.
Mix Wet Ingredients: In a large bowl, cream butter, granulated sugar, and brown sugar until fluffy, about 2-3 minutes, using a hand or stand mixer. Add egg and vanilla extract, beating until smooth. Stir in drained zucchini.
Mix Add-Ins: Fold in chocolate chips and walnuts (if using).
Scoop Dough and Bake: Using a cookie scoop, place dough 2 inches apart on baking sheets. Bake for 13-15 minutes, until edges are lightly golden and centers are set but soft. Cool on baking sheet for 5 minutes, then transfer to a wire rack.
Storage: Store in an airtight container at room temperature for up to 5 days.
Notes
Squeeze zucchini thoroughly to prevent spreading. Yellow squash has significantly more water than zucchini.
The whole egg creates a cakey texture; for chewier cookies, try an egg yolk and chill dough 2-4 hours.
Layer cookies with parchment in storage to avoid sticking.