Preheat and prep pan: Preheat oven to 350°F. Line an 8x8-inch (or 9x9) metal baking pan with parchment paper, leaving overhang on two opposite sides.
Brown the butter: In a medium saucepan over medium heat, melt the butter, stirring frequently with a rubber spatula. It will foam, then subside, and brown specks will appear. As soon as it smells nutty and turns amber (about 5-7 minutes), remove from heat immediately and pour into a large mixing bowl. Do not strain out the milk solids.
Mix sugars: Add brown sugar and granulated sugar to the warm browned butter. Whisk until combined and looks like wet sand. Let sit 2 minutes to melt the sugar into the fat.
Add egg, yolk, and vanilla: Whisk in the egg, egg yolk, and vanilla extract. Whisk vigorously for about 30 seconds until smooth, glossy, and slightly lighter in color.
Fold dry ingredients: Add flour, baking soda, and salt all at once. Fold with a rubber spatula until just combined (a few streaks of flour are fine). Do not overmix.
Add chocolate: Fold in chocolate chips or chopped chocolate until evenly distributed. Reserve a handful to press on top before baking.
Press into pan: Scrape dough into prepared pan and press into an even layer. Press reserved chocolate pieces onto the top.
Bake: Bake for 25–30 minutes. Edges should be golden brown; center should look set but still soft (it will jiggle slightly). A toothpick inserted in the center should come out with moist crumbs, not wet batter. Start checking at 22 minutes.
Cool completely: Cool bars in the pan on a wire rack for at least 30 minutes. Use the parchment sling to lift out the whole block onto a cutting board. Cut into 16 squares with a sharp knife. Sprinkle with flaky sea salt before serving.