Preheat your oven to 350°F (175°C). Grease the 9x13-inch baking dish.
In a large mixing bowl, whisk together 2 cups of flour, 1 cup of granulated sugar, 1 tablespoon of baking powder, and ½ teaspoon of salt.
Add ½ cup of softened butter, 1 cup of milk, 2 large eggs, and 1 teaspoon of vanilla extract to the dry ingredients. Mix until just combined.
Fold in the diced apples and 1 teaspoon of cinnamon, making sure they are evenly distributed throughout the batter.
Pour the batter into the prepared baking dish, spreading it evenly.
In another bowl, prepare the streusel topping by combining ½ cup of flour, ½ cup of brown sugar, ¼ cup of melted butter, 1 teaspoon of cinnamon, and oats (if using). Mix until crumbly.
Sprinkle the streusel mixture evenly over the top of the cake batter.
Bake in the preheated oven for 35-40 minutes, or until a toothpick inserted in the center comes out clean.
Allow the coffee cake to cool in the baking dish for about 10 minutes before slicing into pieces.