01 - Preheat oven to 350°F. Grease and line three 8-inch round cake pans with parchment paper.
02 - Whisk flour, baking powder, baking soda, and salt in a medium bowl; set aside.
03 - Beat butter and sugar until light and fluffy, about 3 minutes, using an electric mixer.
04 - Add eggs one at a time, beating well after each addition. Mix in lemon zest, lemon juice, and vanilla extract.
05 - Add the dry ingredients in three parts, alternating with milk, starting and ending with dry mixture. Mix until just combined, avoiding overmixing.
06 - Divide batter evenly among pans, smooth tops, and bake 25–30 minutes or until a toothpick inserted in centers comes out clean.
07 - Cool cakes in pans for 10 minutes, then remove onto wire racks to cool completely.
08 - Combine raspberries, sugar, and lemon juice in a saucepan over medium heat. Stir and mash until bubbles form. Add cornstarch slurry; cook 1–2 minutes until thickened. Remove from heat and cool.
09 - Beat cream cheese and butter until smooth. Gradually add powdered sugar until fluffy. Mix in lemon zest, lemon juice, vanilla, and salt until smooth.
10 - Place one cake layer on a plate, spread half of the raspberry filling leaving a border. Add second layer, repeat with remaining filling. Top with third layer. Frost top and sides with lemon cream cheese frosting.
11 - Optional: garnish with fresh raspberries and lemon zest. Chill for 30 minutes before slicing to ensure clean layers.