Preheat oven to 350°F (175°C). Line baking sheets with parchment.
In a bowl, whisk together flour, baking soda, and salt. Set aside.
Beat room-temperature butter with granulated and brown sugar until light and fluffy, about 2–3 minutes.
Add eggs one at a time, mixing until incorporated, then stir in vanilla.
Gradually add the dry ingredients to the wet mixture and mix until just combined; avoid overmixing.
Fold in the chocolate chips or chopped chocolate until evenly distributed.
Scoop 1.5–2 tablespoon portions onto prepared baking sheets, spacing about 2 inches apart.
Chill scooped dough for 30–60 minutes (optional but recommended for thicker, chewier cookies).
Bake for 9–12 minutes, until edges are golden and centers look slightly underbaked.
Remove from oven, sprinkle with flaky sea salt if desired, cool 5 minutes on sheet, then transfer to a wire rack to finish cooling.