Mix the gluten-free flour, xanthan gum, and salt in a medium-sized mixing bowl and set aside.
In a large mixing bowl, add softened butter, sugar, egg, sourdough starter discard, vanilla, and the flour mix. Bring the dough together with your hands. I don't recommend using an electric mixer to avoid incorporating air into the dough.
Turn the dough onto a well-floured working surface. If the dough is too sticky, roll it in flour on all sides to make it easier to work with.
Roll out the dough with a rolling pin into a large square or a rectangular. The thickness should be about ¼ in or ½ cm.
Take a long offset spatula and slide it under the dough to make sure it isn't sticking to the surface.
When cutting out the shapes, you need to make sure that the tops and bottoms are the same size. You can use any shape (heart, flower, round, etc.). Once you cut out all of the cookies, use a smaller cookie cutter or the back side of a piping bag tip to cut out the centers from half of the cookies.
Line your baking sheet with parchment paper or a silicone baking mat and transfer the unbaked cookies to it. You don't need to leave much space in between the cookies as they aren't going to spread.
Bake for 9-11 minutes at 350F/175C or until the edges just barely start browning. Let the cookies chill for a minute or two and transfer them to the cookie tray.
Assemble
Once the cookies cool down, take the tops with the centers cut out and align them all on a baking sheet, a table, or a tray.
Take a fine mesh sieve, add powdered sugar to it, and spread the sugar on top of the cookie tops by tapping on the side of the sieve.
Take the bottoms and spread jam on them. Place the tops onto the bottoms with jam without pressing too hard.
Let the cookies sit for 12 hours before eating as they will become softer after some time. Enjoy!
Notes
Don't stack the cookies on top of each other when storing.The cookies will keep for up to 1 week in the fridge. Use coconut oil for a dairy free version.