In the bowl of a stand mixer fitted with the paddle attachment, beat together the butter and sugar on medium-high speed for 5 minutes, or until very smooth, fluffy, and light in color.
Scrape down the sides of the bowl and beat in the egg and vanilla until well combined.
Mix in the salt and the almond or hazelnut meal just until combined, scraping down the sides of the bowl as needed.
Slowly mix in the flour, beating until just combined. Turn the dough out onto plastic wrap, parchment or waxed paper and shape into a disk. Wrap and refrigerate for at least 1 hour.
Preheat the oven to 375°F. Line two sheet pans with parchment paper. Set aside.
Roll out dough 1/4 at a time between two pieces of parchment or waxed paper until about 1/8 inch thick. Cut out cookies, making sure to cut windows in half of the cookies, and place on prepared baking sheets about 1/2 inch apart. Because tops and bottoms make bake at slightly different rates, I recommend placing all tops on one sheet and all bottoms on another.
Chill cut-out cookies for 20 minutes. Bake for 10-12 minutes, until cookies are set and barely starting to turn golden on the edges.
Allow cookies to cool for 5-10 minutes on baking sheets before moving to a cooling rack to cool completely.
When ready to serve, place a small spoonful of jam on each of the bottom cookies. Dust the top cookies with powdered sugar, then place the top cookies on top of the bottoms, creating sandwiches.
Notes
Cookies will soften if they are left filled overnight. If you prefer your cookies to be crisp, I recommend waiting to fill them until just before serving.