Preheat oven to 375 degrees F. Line two baking sheets with parchment paper.
In a medium bowl, whisk the flour, baking soda, and salt until combined.
In the bowl of a stand mixer, beat the butter and sugar for 2-3 minutes using the paddle attachment until light. Add the egg and vanilla, then beat again.
Alternate adding the flour mixture with the buttermilk, beating after each addition and scraping the sides of the bowl, just until combined. Gently stir in rainbow sprinkles.
Use a small scoop to drop batter onto the parchment-lined baking sheets, spacing them 2-3 inches apart.
Bake for 10 to 12 minutes, until just done around the edges and the tops bounce back when lightly touched. Cool on the baking sheet for 5 minutes before transferring the cookies to a wire cooling rack to cool completely.
Prepare the Frosting: Beat the butter in a large bowl using an electric mixer until creamy and light, about 4 minutes. Add the powdered sugar, one cup at a time, mixing on medium-low speed to combine. Beat in the vanilla, almond extract, coconut extract, salt, and enough of the cream or milk to get a nice, pipeable consistency. Transfer to a piping bag fitted with a round tip.
Assembly: Pipe a layer of frosting onto the flat side of one cookie, then top with another cookie to make a whoopie pie. Roll edges in additional sprinkles, if desired.
Store in an airtight container for up to 1 week.