Preheat oven to 350°F (175°C). Line baking sheets with parchment paper or silicone liners.
Whisk together the flour, cocoa powder, baking soda, and salt. Set aside.
Using an electric mixer on medium speed, beat the butter and sugar until light and fluffy. Add the eggs, one at a time, mixing well after each addition. Mix in the vanilla.
Reduce mixer speed to low. Gradually add the flour mixture, mixing just until combined.
Using about a tablespoonful (I use a #50 scoop) of dough at a time, roll the dough into balls before placing onto the prepared pans. Bake, one pan at a time, 8 to 10 minutes, or until the cookies are almost set with a soft center. Do not overbake.
Use the rounded end of a mixing spoon, a tart tamper, or other tool to make an indentation in the center of each cookie.
Cool the cookies on the pans for 5 minutes. Then transfer the cookies to a wire rack to cool completely.
To make the filling:
Using an electric mixer on medium speed, beat the cream cheese, butter, peanut butter, and vanilla until thoroughly combined. Gradually add the confectioners’ sugar, and mix until smooth.
Place the filling in a zip-top bag and make a small cut at a bottom corner. Pipe the filling into the indentations in the cooled cookies.
If desired, top each cookie with chocolate sprinkles.
Notes
You may want to place the filled cookies in the refrigerator briefly before serving so the filling will set.
Store leftover cookies in the refrigerator, and bring them to room temperature before serving.