01 - Preheat the oven to 350°F. Line two baking sheets with parchment paper.
02 - In a medium bowl, whisk together the flour, baking soda, baking powder, and salt. Set aside.
03 - In a large bowl, beat the butter, miso, brown sugar, and granulated sugar together until creamy and smooth, about 2–3 minutes.
04 - Add eggs one at a time, beating well after each addition. Mix in the vanilla extract.
05 - Gradually add the dry ingredients to the wet mixture, mixing just until combined.
06 - Fold in the chocolate chips or chopped chocolate.
07 - Scoop the dough, about 2 tablespoons per cookie, onto prepared baking sheets, spacing about 2 inches apart.
08 - Sprinkle with flaky sea salt if desired.
09 - Bake for 11–13 minutes, until the edges are golden and the centers are still slightly soft.
10 - Cool on the baking sheet for 5 minutes, then transfer to a wire rack to cool completely.