Preheat oven to 350℉.
In an 8-inch cast iron skillet (or similar sized oven safe skillet), melt butter over medium heat. Once butter has melted, continue to cook. Swirl pan occasionally. Mixture will bubble and foam as it cooks. Continue to cook until butter smells fragrant and nutty. The milk solids in the butter will turn a rich brown color. Remove from heat and pour into a mixing bowl. Allow brown butter to cool for 10 minutes. Do not wash skillet. Set aside for later use.
Add brown sugar and granulated sugar to brown butter. Mix until sugars are moistened. Add egg and vanilla. Mix until incorporated. Add peanut butter and mix until incorporated.
Whisk together flour, salt, baking soda, baking powder, and optional espresso powder. Add dry ingredients to wet ingredients. Use a sturdy spatula to fold together. Add chocolate chunks and fold until distributed among dough.
Transfer cookie dough to used 8-inch skillet. Press cooke dough along sides of the pan, ensuring an even layer of dough in the pan. Bake for 10-13 minutes until the edges of the cookie have set and are golden brown, while the center of the cookie is still slightly soft.
Allow to cool for a few minutes. Sprinkle sea salt flakes, if desired. Serve and enjoy warm. For a decadent experience, serve with a scoop of ice cream.