Preheat the oven: Preheat the oven to 375°F (190°C). Line a baking sheet with parchment paper or a silicone mat.
Whisk together the dry ingredients: In a medium bowl, whisk together the flour, baking soda, and salt. Set aside.
Cream together the butter and sugars: In a large bowl, use an electric mixer to cream together the butter and sugars until light and fluffy, about 2-3 minutes.
Beat in the eggs and vanilla: Beat in the eggs one at a time, followed by the vanilla extract.
Mix in the dry ingredients: Gradually mix in the dry ingredients until just combined, being careful not to overmix.
Stir in the chocolate chips and walnuts (if using): Stir in the chocolate chips and walnuts (if using).
Scoop the dough: Scoop the dough into balls, about 2 tablespoons each. Place the balls onto the prepared baking sheet, leaving about 2 inches of space between each cookie.
Bake the cookies: Bake the cookies for 12-14 minutes, or until they are lightly golden brown on the edges and set in the center.
Let the cookies cool: Let the cookies cool on the baking sheet for 5 minutes, then transfer them to a wire rack to cool completely.