Preheat your oven to 375°F (190°C) and line a baking sheet with parchment paper.
In a small bowl, whisk together the flour and baking soda; set aside.
In a large mixing bowl, cream together the butter, granulated sugar, brown sugar, and salt until the mixture is light and fluffy.
Beat in the vanilla extract and eggs, one at a time, until well combined.
Gradually add the flour mixture to the butter mixture, beating until just blended.
Stir in the chocolate chips and walnuts, if using, until evenly distributed.
Use a cookie scoop or spoon to drop dough onto the prepared baking sheet, spacing the cookies about 2 inches apart.
Bake for 9 to 11 minutes, or until the edges are golden but the centers are still soft.
Allow the cookies to cool on the baking sheet for 5 minutes before transferring them to a wire rack to cool completely.