Preheat your oven to 350°F (175°C). Grease and line two 9-inch round cake pans with parchment paper.
In a large mixing bowl, cream together the softened butter and granulated sugar until light and fluffy, about 3-5 minutes. This incorporates air into the mixture, helping the cake rise.
Add the eggs one at a time, mixing well after each addition. This ensures that the eggs are fully incorporated and helps create a smooth batter.
Stir in the vanilla extract.
In another bowl, whisk together the sifted flour, baking powder, and salt.
Gradually add the dry ingredients to the wet mixture, alternating with the milk. Start and end with the dry ingredients. Mix until just combined to avoid overmixing, which can lead to a dense cake.
Divide the batter evenly between the prepared cake pans.
Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted into the center comes out clean. Allow the cakes to cool in the pans for 10 minutes before transferring to a cooling rack to cool completely.
Make the Cookie Dough Filling
In a mixing bowl, cream together the softened butter and brown sugar until smooth.
Add the heat-treated flour and mix until combined. Heat-treat the flour by spreading it on a baking sheet and baking at 350°F (175°C) for 5-10 minutes to kill any bacteria.
Mix in the vanilla extract and sweetened condensed milk until smooth.
Fold in the mini chocolate chips. Set aside.
Prepare the Frosting
In a large mixing bowl, beat the softened butter until creamy.
Gradually add the sifted powdered sugar, mixing on low speed until combined. Then increase to medium speed and beat until fluffy.
Add the milk and vanilla extract, mixing until smooth. Adjust the consistency with more milk if necessary.
Fold in the cookie dough filling until well combined.
Assemble the Cake
Once the cakes are completely cooled, place one layer on a serving plate. Spread a generous layer of cookie dough frosting on top.
Place the second cake layer on top and frost the top and sides of the cake with the remaining cookie dough frosting.
Decorate the top of the cake with mini chocolate chips.
Refrigerate the cake for at least 30 minutes to set the frosting before slicing and serving.
Notes
For best results, ensure all ingredients are at room temperature before starting. This cake is best enjoyed fresh but can be stored in an airtight container in the refrigerator for up to 3 days.