Preheat the oven to 350°F (175°C). Line a baking sheet with parchment paper.
In a large mixing bowl, cream together the softened butter, granulated sugar, and brown sugar until light and fluffy.
Add the sourdough discard, egg, and vanilla extract to the butter mixture. Mix well until fully combined.
In a separate bowl, whisk together the all-purpose flour, baking soda, and salt.
Gradually add the dry ingredients to the wet mixture, stirring until just combined. Avoid overmixing.
Fold in the chocolate chips and chopped nuts, if using.
Using a spoon or cookie scoop, drop tablespoon-sized mounds of dough onto the prepared baking sheet, spacing them about 2 inches apart.
Bake in the preheated oven for 10-12 minutes or until the edges are golden brown and the tops look set.
Remove from the oven and allow the cookies to cool on the baking sheet for a few minutes before transferring them to wire racks to cool completely.
For a different flavor, you can add spices like cinnamon or nutmeg.
If you prefer a softer cookie, underbake them slightly and let them sit on the baking sheet longer.
Store any leftover cookies in an airtight container at room temperature for up to a week.