Heat a cast iron or a frying pan on medium heat, and dry toast 1/2 cup plus 2 tablespoons whole hazelnuts until they are fragrant and tanned. Once cooled, transfer the nuts to a food processor, preferably a mini one. Add 2 teaspoons flour and pulse just until nuts are finely ground, being careful not to over process.
In the bowl of a stand mixer fitted with the paddle attachment, cream together 1 cup butter and 2/3 cup light brown sugar on medium-high speed until light and fluffy, 2 to 3 minutes, scraping bowl as needed. Add 2 egg yolks and vanilla, and beat on medium-high speed until well combined, about 2 minutes, scraping the bowl a few times as needed.
Add 1/2 cup ground nuts, the salt and the remaining 2 1/4 cups flour; beat on low speed just until combined, then increase speed and beat until dough starts to clump together. Scrape the bowl and fold a few times to make sure everything is well mixed. Wrap dough in plastic wrap, flatten into a disk, and chill until firm, at least 1 hour and up to 3 days.
Heat oven to 350 degrees. Use a cookie scoop of 1.6 inch/4 cm to shape equal small pieces of dough. Place a few inches apart on parchment. Chill in the freezer until firm, about 10 minutes.
Bake for 8 minutes, remove from oven and make a thumbprint in each cookie. Bake until golden brown on the bottom, and nuts are looking toasty but not burned, 6 to 8 minutes longer. Let cool a few minutes on the baking sheets and transfer to wire racks to cool further. While the cookies are still a little warm, fill each one with about 1/2 teaspoon of filling, and cool completely. Sprinkle with flaky sea salt.
Store cookies in airtight container at room temperature for up to 1 week.