Start by preheating your oven to 350°F (177°C). This ensures that the oven is hot and ready for baking once your cookies are prepared. Line two baking sheets with parchment paper.
In a large mixing bowl, combine the softened butter and cream cheese. Using a paddle attachment, mix until the two ingredients are well combined, creating a smooth and creamy mixture.
Next, add the sugar and baking powder to the bowl. Continue mixing until everything is well incorporated and fluffy. The mixture should appear light and airy.
Now, crack in the egg and pour in the vanilla extract. Mix again until these ingredients are fully integrated into the batter.
Gradually add the all-purpose flour, mixing until just combined. Be careful not to overmix, as this can lead to tough cookies. You want the dough to be soft and pliable.
Once your dough is ready, form it into a ball and divide it in half. Wrap each half in plastic wrap and place them in the refrigerator to chill for about 20 minutes. This makes the dough easier to roll out.
After chilling, take one piece of dough out of the fridge. Roll it into a 10-inch square on a lightly floured surface. If you have a pastry wheel, use it to cut the dough into 8 squares, each approximately 2×2 inches.
Using a knife or pizza wheel, cut 1 inch slits from each corner toward the center, being careful not to cut all the way through. This will help form the pinwheel shape.
Now, fold each tip of the square toward the center, creating the pinwheel shape. Place each shaped cookie onto the prepared baking sheets.
Add about ½ teaspoon of raspberry jam into the center of each cookie, then sprinkle with the chopped pistachios or almonds if using. Repeat the process with the second piece of dough.
Transfer the baking sheets to your preheated oven and bake for 8 to 10 minutes, or until the edges of the cookies are lightly browned. Keep an eye on them to avoid over-baking.
Once baked, let the cookies cool on the sheets for 5 minutes before transferring them to wire racks to cool completely. This helps them firm up while cooling.