In a medium bowl, combine the softened butter and sugar, then beat together for 3 minutes until the mixture is light, fluffy, and pale in color. This creaming process incorporates air into the dough, which helps create a tender, cake-like texture in these gluten-free cookies. The pale color and increased volume indicate you've beaten in enough air.
Add the room temperature egg to the creamed butter and sugar, then mix until combined. Stir in the vanilla extract, almond extract, and salt. In a separate small bowl, whisk together the baking powder, ground nutmeg, cornstarch, and gluten-free flour—I like to do this dry mix separately so the baking powder distributes evenly throughout the flour, preventing any bitter pockets. I find that sifting the dry ingredients together is worth the extra minute to ensure a tender, even crumb in gluten-free baking.
Add the sour cream to the wet mixture and stir until combined, then fold in the dry ingredient mixture from Step 2 until just combined—do not overmix, as this can toughen the dough. Divide the dough in half, wrap each portion tightly in plastic wrap, and refrigerate for at least 1 hour. Chilling allows the gluten-free dough to relax and helps prevent spreading during baking.
Preheat your oven to 350°F and line baking sheets with parchment paper. Working with one portion of chilled dough at a time (keep the other refrigerated), roll it out on a lightly floured surface to 1/4 inch thickness. Cut into heart shapes or your desired Valentine's shapes using cookie cutters, then place on the prepared baking sheets about 1 inch apart.
Bake for 9–11 minutes, until the edges are lightly golden but the centers still look just barely underbaked—this keeps them tender and cake-like. Allow the cookies to cool on the baking sheet for 5 minutes to set slightly, then transfer to a wire rack to cool completely before frosting.
While cookies cool, prepare the frosting: combine the softened butter, sour cream, and sifted powdered sugar in a bowl and beat until smooth and lump-free. Stir in the almond extract and milk to reach a spreadable consistency, then add food coloring to your desired shade. Once the cookies are completely cool, spread or pipe the frosting onto each cookie. I always sift the powdered sugar before mixing because even small lumps can create a grainy frosting texture.