Preheat the oven to 355°F (180°C) and line a cookie sheet with parchment paper.
Melt the butter in a saucepan over medium heat, stirring frequently. When you see golden brown bits at the bottom, remove from heat.
Pour the brown butter into a heat-safe container to cool to room temperature, using an ice water bath to speed cooling if desired.
Whisk the brown sugar, granulated sugar, and cooled brown butter together in a large mixing bowl until thick, creamy, and lightened in color.
Add the egg, sea salt, and vanilla extract to the mixture and whisk until very creamy.
Sift the all-purpose flour, cocoa powder, and baking soda into the bowl and stir with a spatula until a thick dough forms.
Fold most of the chopped chocolates and fresh or frozen raspberries gently into the cookie dough, reserving some chocolate for topping.
Use a medium cookie scoop to portion dough into balls and arrange on the prepared baking sheet.
Press the reserved chocolate pieces on top of each cookie dough ball.
Bake for 8 to 10 minutes, 8 minutes for softer, fudgier cookies. Remove and let cookies set a few minutes before serving.
Sprinkle flaky salt on top of the cookies after baking.