Preheat oven to 350 degrees F (175 degrees C). Grease a 9-inch round cake pan with cooking spray.
Whisk flour, sugar, and baking powder in a bowl until well mixed. Add butter; beat with an electric mixer until creamy. Add eggs one at a time, beating well after each addition. Pour in milk and vanilla extract; beat until creamy, 1 to 2 minutes. Pour batter into the prepared cake pan.
Bake in the preheated oven until a toothpick inserted into the center comes out clean, about 40 minutes.