Preheat oven to 350°F (180°C) and line baking sheets with parchment paper.
Whisk flour, cocoa powder, baking soda, and salt in a bowl.
Beat butter and sugars until light and fluffy.
Add egg, then vanilla, vinegar, and food coloring; mix well.
Add dry ingredients and mix until just combined.
Scoop dough into small balls and bake for 7–9 minutes.
Cool cookies completely on a wire rack.
Beat cream cheese and butter until smooth. Add powdered sugar and vanilla; mix until fluffy.
Pipe or spread frosting onto cookies and sandwich with another cookie.
Add sprinkles if desired and chill before serving.