Allow the 2 sticks of butter to sit at room temperature for about 30 minutes, or until softened and room temperature.
Preheat oven to 350°. Butter a 9x5-inch loaf pan.
In a medium mixing bowl combine flour, baking powder, and salt. Whisk to combine.
In a large bowl, or the bowl of a stand mixer with paddle attachment, combine sugar and ginger. Rub together with your fingers until evenly combined and sugar is fragrant. Add softened butter and beat together on medium speed until light and fluffy, about 5 minutes
On low speed, beat in the eggs, one at a time, allowing each to fully incorporate before adding the next.
Add summer squash and mix until fully combined. Add sourdough discard and mix until fully combined. Scrape down sides of bowl.
Add dry ingredient mixture into wet ingredient mixture. Mix with a spatula or wooden spoon until just evenly incorporated, scraping down sides of the bowl as needed.
Pour batter into the prepared loaf pan and spread into an even layer. Firmly tap the pan on the countertop several times to settle the batter and work out any air bubbles.
Bake for 50-60 minutes or until a long wooden skewer inserted in the center comes out clean, and internal temperature is 210°. Allow to cool in the pan for about 10 minutes, then remove from pan and cool completely on a wire rack (about 1-2 hours) before serving or icing. Don't be alarmed if the bottom seems dark, it will lighten as it cools.
If icing: Once cake has cooled, combine powdered sugar and zest from lemon in a small mixing bowl. Juice lemon and add 15 grams/1 tbsp lemon juice to the powdered sugar. Mix until icing is thick but smooth. Add more lemon juice by the teaspoon if icing is too thick to spread. Spread icing on top of cake and allow it to set before slicing.