Preheat oven to 375°F. Line two baking sheets with parchment paper.
In a medium bowl, whisk the flour, baking soda, and salt until combined.
2 1/2 cups all-purpose flour, 1 1/4 teaspoons baking soda, 1/4 teaspoon salt
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.
1 cup granulated sugar, 1/2 cup salted butter, 1 large egg, 2 teaspoons vanilla extract
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.
3/4 cup buttermilk, 1/2 cup 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.
1 cup salted butter, 4 cups powdered sugar, 1 teaspoons vanilla, 1/4 teaspoon almond extract, 1/4 teaspoon coconut extract, 1/2 teaspoon salt, 2-4 Tablespoons heavy cream or milk
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.