Preheat the oven to 350°F (175°C).
In a large skillet, heat olive oil over medium heat. Add the diced onions and sauté until translucent, about 5 minutes.
Add the cooked potatoes and chopped bacon to the skillet. Cook until the bacon is crispy, stirring occasionally, about 8 minutes.
In a bowl, whisk together the eggs, milk, salt, and pepper until well combined.
Pour the egg mixture into the skillet over the bacon and potato mixture. Sprinkle the grated cheese on top.
Cook on the stovetop for about 5 minutes until the edges begin to set, then transfer the skillet to the preheated oven.
Bake in the oven for 20-25 minutes or until the frittata is set and slightly golden on top.
Remove from the oven and let it cool for a few minutes before slicing.
Serve warm or at room temperature, garnished with fresh herbs if desired.