Preheat the oven to 350°F (180°C) and line a baking sheet with parchment paper.
Beat the softened butter and sugar together until light and fluffy.
Add the egg and vanilla extract to the mixture and combine well.
In a separate bowl, whisk together the flour, baking powder, and salt.
Gradually add the dry ingredients to the wet ingredients, mixing until a smooth dough forms.
Roll the dough out to about 1 inch thickness on a clean surface.
Cut out heart shapes using the cookie cutter and place them on the prepared baking sheet.
Gently press a small indentation in the center of each heart-shaped cookie.
Fill each indentation with a small spoonful of raspberry or strawberry jam.
Bake the cookies for 10 to 12 minutes until the edges are lightly golden.
Allow the cookies to cool on the baking sheet, then dust with powdered sugar if desired.