Preheat oven to 375°F (190°C) and line baking sheets with parchment paper.
In a large bowl, cream together butter, white sugar, and brown sugar until light and fluffy.
Beat in eggs one at a time, then add vanilla extract.
In another bowl, whisk flour, baking soda, and salt.
Gradually add dry ingredients to wet mixture, stirring until combined.
Fold in chocolate chips and walnuts (if using).
Use a small cookie scoop to place dough onto baking sheets, leaving 2 inches apart.
Bake for 8–10 minutes until edges are lightly golden.
Let cookies cool on baking sheet for 5 minutes, then transfer to a wire rack.