Preheat oven to 350°F. Line an 8x8-inch baking pan with parchment paper, leaving a 2-inch overhang on at least 2 of the sides to easily lift the bars out as a whole. Set aside.
Make the cookie base. In a medium bowl, combine the flour and salt. Set aside.
Using a stand mixer with a paddle attachment, beat the cream cheese, butter, and sugar for 3 minutes on medium speed until smooth. Scrape down the sides and bottom of the bowl.
Beat in the egg, vanilla, and almond extract together until smooth and creamy, about 1 minute. Add the flour and salt and mix on low speed for about 30 seconds or just until combined.
Transfer mixture to baking dish and gently spread to the edges. Bake for 20-25 minutes, or until just set in the center and the edges are barely golden. Let the bar cool completely for about 1 hour on a wire rack.
Make the vanilla frosting. Using the paddle attachment, beat softened cream cheese on medium speed until smooth and creamy, about 1 minute. Add butter and beat for 2 more minutes until fluffy and lump-free.
Gradually add powdered sugar on low speed. Add salt, vanilla, and heavy cream. After everything is combined, beat on high speed for 3 minutes to incorporate air. Scrape down the sides and bottom of the bowl.
Frost the bars. Once the bars have completely cooled, remove from the pan by lifting the parchment paper. Spread the frosting over the cookie bars and decorate with sprinkles, if using. Slice into 16 square bars and serve.