Preheat the oven to 350°F (175°C). Grease a 9x5-inch loaf pan and line it with parchment paper, leaving overhang on the long sides.
Prep the zucchini: Shred the zucchini. Place in a colander and sprinkle with ½ teaspoon salt. Let sit for 10 minutes.
Squeeze it dry: Transfer zucchini to a clean kitchen towel or cheesecloth and squeeze out as much liquid as possible. You should get at least ¼ cup of liquid out.
Shred the apple: Shred the apple (skin on or off). Gently squeeze in a paper towel to remove excess juice — not as aggressively as the zucchini.
Mix wet ingredients: In a large bowl, whisk together sugar, oil, eggs, and vanilla until smooth and slightly thickened, about 1 minute.
Add zucchini and apple: Stir in the shredded zucchini and apple until well combined.
Mix dry ingredients: In a separate bowl, whisk together flour, cinnamon, nutmeg, cloves, baking soda, baking powder, and salt.
Combine: Add dry ingredients to wet ingredients and stir with a spatula until just combined. Do not overmix — a few streaks of flour are fine.
Fold in nuts (if using): Gently fold in the walnuts or pecans.
Bake: Pour batter into prepared pan and smooth the top. Bake for 55–65 minutes, until a toothpick inserted in the center comes out clean or with a few moist crumbs. The top should be deep golden brown and cracked.
Cool: Let the bread cool in the pan for 10 minutes, then transfer to a wire rack to cool completely before slicing — at least 1 hour. Slicing warm will cause crumbling.