Preheat the oven: Start by preheating your oven to 180°C (350°F). Line a muffin tray with paper liners to prevent the muffins from sticking and for easy cleanup.
Make the vanilla batter: In a bowl, whisk together the dry ingredients for the vanilla batter: flour, sugar, baking powder, and salt. This helps evenly distribute the dry ingredients before adding the wet ingredients.
In a separate bowl, mix the egg, milk, oil (or melted butter), and vanilla extract. Add this wet mixture to the dry ingredients and stir until combined. Be careful not to overmix; the batter should be smooth and creamy but still thick and lump-free.
Make the chocolate batter: In another bowl, combine the dry ingredients for the chocolate batter: flour, sugar, baking powder, salt, and cocoa powder. Mix until everything is evenly distributed.
In a separate bowl, whisk together the egg, milk, oil (or melted butter), and vanilla extract for the chocolate batter. Add this wet mixture to the dry ingredients and mix until smooth. The batter should be thick and rich, with a deep chocolate color.
Assemble the muffins: Spoon a small amount of the vanilla batter into each muffin cup. Follow with a spoonful of the chocolate batter, layering them alternately. Repeat until each muffin cup is about ¾ full. This will give you the beautiful marble effect once the batters are swirled together.
Create the marble swirl: Using a toothpick or skewer, gently swirl the two batters together in each muffin cup. Be sure to do this gently so that the batters blend together without completely mixing, allowing the marble effect to form.
Bake the muffins: Place the muffin tray in the preheated oven and bake for 18–20 minutes, or until the tops are set and a toothpick inserted into the center comes out clean. The baking time may vary slightly depending on your oven, so check around 18 minutes and continue baking as needed.