Preheat the oven:
Preheat your oven to 350°F (175°C). Line a baking sheet with parchment paper or a silicone baking mat for easy cleanup.
Cream the butter and sugars:
In a large bowl, beat the softened butter, granulated sugar, and brown sugar together with a hand mixer or stand mixer on medium speed until the mixture is light and fluffy, about 2–3 minutes.
Add the eggs and vanilla:
Add the eggs, one at a time, mixing well after each addition. Stir in the vanilla extract.
Mix the dry ingredients:
In a separate bowl, whisk together the flour, baking soda, and salt. Gradually add the dry ingredients to the wet ingredients, mixing until just combined.
Fold in the chocolate chips and nuts:
Stir in the chocolate chips and chopped nuts (if using) with a spatula or spoon.
Scoop the dough:
Use a cookie scoop or tablespoon to drop rounded balls of dough onto the prepared baking sheet, spacing them about 2 inches apart.
Bake the cookies:
Bake the cookies for 9–11 minutes, or until the edges are golden and the centers are still slightly soft. Keep an eye on them, as baking time can vary based on your oven and the size of the cookies.
Cool and serve:
Remove the cookies from the oven and let them cool on the baking sheet for a few minutes before transferring to a wire rack to cool completely. Enjoy your warm, gooey cookies!