In a medium bowl, combine the flour, salt, and baking powder and stir well to mix. Set aside.
In a mixing bowl using a handheld or stand mixer, beat the butter and sugar until creamy, about 1 minute. Add the milk, vanilla extract, and almond extract, if using, and mix well.
Add the flour mixture to the wet ingredients and mix until the dough comes together and all the flour is incorporated. Scrape the sides and bottom of the bowl as needed.
Gather the dough into a ball, then divide it into 2 equal-sized discs. Wrap each in plastic wrap and refrigerate for 30–45 minutes. After the dough has chilled, preheat your oven to 350°F (approx. 177°C).
Remove the discs of dough from the fridge and place one of them on a floured surface. Roll the dough out to 1/8–1/4 inch (1/4-1/2 cm) thick, depending on how tall you would like your sandwich cookies. If the dough sticks, flour the surface of the dough and the rolling pin, as well. Using a round, scalloped cookie cutter about 2 inches (5–6 cm) in diameter (or other cookie cutter of choice), cut shapes into the dough, then use a thin spatula (I use the metal type) to transfer the cookies to a parchment-lined or nonstick baking sheet 2 inches (5 cm) apart from one another. Gather and re-roll the remaining dough until it’s all used up.
The second disc of dough will be used to make the top halves of the cookies. Roll the dough out and cut cookies using the same cutter as for the previous batch, then use mini cookie cutters to cut out hearts, stars, or other shapes from the center of each cookie. Place the top halves on a parchment-lined or nonstick baking sheet as well.
Bake in your preheated oven for 7–8 minutes or just until set. Do not let them brown.
Cool on the baking sheets for 3–5 minutes before transferring to a cooling rack. While still warm, liberally dust the top halves of the cookies (with the mini cutouts) with a first coating of powdered sugar using a fine-mesh sieve or flour sifter. Once completely cooled, dust with a second coating.
Spoon 1–2 tsp. of jam onto each of the bottom-layer cookies and spread evenly to reach all edges of the circle. To assemble, place the powdered sugared top halves on top of the bottom halves so that the jam shows through the cutout. Enjoy!