With an electric mixer, mix together the butter and sugar until they are blended and creamed together. Then mix in the vanilla.
Add the flour, and mix on low speed for 2-3 minutes, until the ingredients have combined into a dough. Note that the dough will look crumbly at first, but if you keep mixing, the dough should eventually come together.
Use a medium cookie scoop to portion out scoops of dough, then roll each one into a ball. Use your thumb to make small indentations in the top, for later holding the jam.
To keep the cookies from spreading during baking, refrigerate the cookies for 30-60 minutes, until firm to the touch. You can rush this process by freezing for 15 minutes instead, but they may spread slightly.
Evenly space the cookies on a half sheet tray, then fill each cookie with 1/2 to 1 tsp of jam in each indentation.
Bake for 18-20 minutes until the cookies are lightly golden on the edges, but still mostly pale in color. You don't want to overbake these.
Let the cookies cool completely on a wire rack, for at least 60 minutes, but ideally a few hours. These aren’t the kind of cookies that taste good when they’re hot. Enjoy!
If you desire to coat these in coconut flakes, place one beaten egg in one bowl, and 7 ounces of sweetened, shredded coconut in another. After you've chilled but not filled the cookies, dip each one in the beaten egg, then into the coconut, until well coated. Then add the jam, and bake for the same amount of time as written in the instructions above.