Combine the flour and salt in a bowl and whisk to blend.
In a mixing bowl with an electric mixer, beat the butter and confectioners’ sugar until fluffy. Add the egg yolks and vanilla and beat until well blended.
Slowly beat in the flour mixture until just blended.
Flatten the dough into a disc, wrap it in plastic, and refrigerate it for 20 to 30 minutes.
Position an oven rack in the center of the oven and heat to 350 F.
Flour the dough lightly and roll it out to about 1/4-inch thick between 2 sheets of parchment paper or wax paper.
Use a round 2-inch or 2 1/2-inch cutter to cut out the cookies. Move them to the prepared baking sheet. Cut out small hearts, rounds, or designs in the center of half of the cookies. If you don’t have tiny cutters you can use the small hole of a large piping tip or a straw.
Gather the scraps, roll, and repeat.
Bake the cookies in the preheated oven until the edges are just showing light brown color, about 14 to 18 minutes. Remove them to a rack and leave the oven on.
Cool the cookies in the pan for a few minutes then carefully move them to a rack to cool completely.
Once the cookies have cooled completely, spread about 1/4 to 1/2 teaspoon of jam on the flat side of a cookie without a center cut-out. Top it with a cookie with a center cut-out. Repeat with the remaining cookies. Place them on the baking sheet and put them back in the oven for 5 minutes. This will help set the jam.