Preheat the oven to 350F.
Add the butter to a pan over medium heat. Stir the butter as it melts. After a few minutes the butter will start to bubble, then will foam up. Once the foam subsides, you'll be left with brown, nutty smelling butter! It should take about 7-10 minutes. Pour into a glass container and transfer to the freezer for 10 minutes to cool down.
Add the chilled butter, brown sugar, sugar to a bowl. Use a stand mixer or hand mixer to mix for 4-5 minutes, until fluffier and lighter in color.
Add miso paste, eggs, and vanilla extract. Mix until combined.
Add the flour, baking soda, and salt. Mix until just combined.
If you're using chocolate bars, cut them into small pieces, like shavings. Add the chocolate to the dough and mix until just combined.
Use a large (about 1/4 cup) cookie scoop to scoop out the dough. Add up to 6 dough balls to a lined baking sheet. Bake for 8-11 minutes, until the edges are just starting to brown.
Top with flaky salt and let the cookies cool on the baking sheet for 10 minutes. Enjoy!