Preheat the oven to 350°F. Spray a 9×5-inch loaf pan with nonstick cooking spray.
Toss the cranberries with the flour in a small bowl and set aside.
In a large bowl, cream the butter and sugar with an electric mixer. Add the vanilla and eggs and mix until combined.
In a separate bowl, whisk together the flour, baking powder, baking soda, and salt.
Gradually add the dry ingredients and milk to the butter mixture, alternating between the two. Mix by hand or on low speed just until combined; do not overmix.
Gently fold in the cranberries by hand.
Pour the batter into the prepared loaf pan. Bake for 45–60 minutes, until a toothpick inserted in the center comes out clean.
Let the bread cool completely in the pan, then remove it and transfer to a wire rack to finish cooling before slicing.
Notes
If you use frozen cranberries make sure that they are thawed out before using them. Store the leftover bread i