Start by beating the cream cheese, powdered sugar, egg yolk, and vanilla in a large bowl using an electric mixer. Mix until completely smooth and creamy. Transfer the filling into a piping bag or resealable bag for easier handling.
Pipe small dollops of the filling onto a parchment-lined sheet. Smooth them with a spoon and freeze until solid, at least one hour. This ensures the filling doesn’t melt while baking the cookies.
Whisk together flour, ground ginger, cinnamon, baking soda, black pepper, and salt in one bowl. In another, beat butter and sugar until fluffy, then add egg, molasses, crystallized ginger, and fresh ginger. Mix in the flour mixture slowly until fully incorporated.
Scoop dough into 2-inch balls, flatten slightly, and place a frozen filling piece in the center. Wrap the dough around the filling and roll into smooth spheres. Chill if the dough feels too soft.
Preheat the oven to 350°F (175°C). Roll the cookies in sanding sugar if desired and place them on parchment-lined sheets. Bake for 15–17 minutes, rotating halfway through. Let cool for 5 minutes on sheets, then transfer to racks.