In a medium mixing bowl, whisk together the flour and salt. Set aside.
In the bowl of a stand mixer, beat together butter and sugar on medium-high speed for 2 minutes, scraping down the sides as needed, until pale and fluffy. Add in the egg and vanilla and mix just until combined.
Turn the mixer to low speed and slowly incorporate the dry ingredients. Then mix for about 2 minutes until combined.
Place the cookie dough onto a large piece of plastic wrap. Flatten the dough into a disk shape that's about 1 inch high. Wrap the plastic wrap around the dough disc so it's sealed. Chill in the fridge for 30 minutes.
Preheat the oven to 350 degrees F and line a cookie sheet (or two) with parchment paper. Set aside.
Generously flour a work surface and unwrap the cookie dough. Roll out the dough so it's ¼ inch thick. Using a 2 ½-inch wide cookie cutter, cut out 30 cookies and place them on the prepared baking sheet. (Knead the dough back together and roll it out again as needed until you have used up as much as you can.) Using a smaller cookie cutter, cut out a shape in half (15) of the cookies. (I use a Linzer cookie cutter set for this step.)
Bake for 11-12 minutes, until the edges of the cookies just start to get golden. Remove from the oven and allow the cookies to cool on the baking sheet for about 5 minutes. Then. transfer to a wire rack to cool completely before assembling.
To assemble: If dusting with powdered sugar, sprinkle it over the "top" cookies with the window cutout now. Then, take a "bottom" cookie without the window and spread 1 to 2 teaspoons of jam over the bottom side almost to the edges. (Doing this keeps the pretty side of each cookie facing out.) Place a "top" cookie over the jam and press gently to adhere the cookie sandwich together. Repeat with the remaining cookies and jam.
Notes
If you don't have linzer cookie cutters, you can use a 2 ½-inch round cookie cutter. The top and bottom half of each cookie sandwich will be the same. If you want the little "window" in the top cookie, use a piping tip to cut out a small circle or a paring knife to cut out a shape in the center of half (15) of the cookies.