Melt the butter in a small saucepan over medium heat. Keep stirring as it foams and turns golden brown, watching it closely so it doesn't burn. Once it smells nutty and you see browned bits at the bottom of the pan, take it off the heat and pour it into a mixing bowl to cool.
Whisk the brown sugar and granulated sugar into the cooled brown butter until combined. Add the egg, egg yolk, vanilla extract, salt and sourdough discard, then whisk again until smooth.
Add the flour, baking powder and baking soda. Fold everything together with a spatula just until no dry flour remains. Avoid overmixing, or the cookies will bake up cakey instead of chewy.
Fold in the chocolate chunks.
Divide the dough into 15 portions, about 70 to 75 grams each, and roll into balls. Place them on a tray, cover, and refrigerate for at least 2 hours, ideally overnight or up to 48 hours.
Preheat the oven to 190°C (375°F) and line a baking sheet with parchment paper.
Place the chilled dough balls on the baking sheet, spacing them a couple of inches apart. Bake straight from the fridge, without pressing them down first.
Bake for 12 to 14 minutes, until the edges are set and golden but the centers still look soft and slightly underbaked. Sprinkle with flaky sea salt right out of the oven, then let the cookies rest on the pan for a few minutes before moving them to a cooling rack.