Preheat the Oven:
Preheat your oven to 350°F (175°C). Grease and line two 9-inch cake pans with parchment paper.
Mix the Dry Ingredients:
In a bowl, whisk together cake flour, baking powder, baking soda, and salt. Set aside.
Cream Butter and Sugar:
Using a mixer, beat butter and sugar together until light and fluffy. Add eggs one at a time, beating well after each addition. Mix in lemon zest and lemon extract.
Combine Wet and Dry Ingredients: Gradually add the dry mixture to the butter mixture, alternating with sour cream and milk. Begin and end with the dry ingredients, mixing just until combined.
Add Raspberries:
Gently fold in raspberries tossed in flour to prevent them from sinking.
Bake:
Divide the batter evenly between the prepared cake pans. Bake for 25–30 minutes, or until a toothpick inserted in the center comes out clean. Allow the cakes to cool in the pans for 10 minutes before transferring to a wire rack to cool completely.
Prepare the Frosting:
Beat softened cream cheese and butter until smooth. Gradually add powdered sugar, mixing until fully incorporated. Stir in lemon juice and zest until creamy and fluffy.
Assemble the Cake:
Place one cake layer on a serving plate. Spread a layer of frosting on top, then add the second cake layer. Frost the top and sides of the cake evenly.
Decorate:
Garnish with fresh raspberries, thin lemon slices, or edible flowers as desired.