Preheat your oven to 375°F (190°C).
Prepare your pie crust by fitting it into a 9-inch pie dish and pre-baking it for about 10 minutes.
In a skillet, heat a little oil over medium heat and sauté the chopped onion until translucent, about 5 minutes.
Add minced garlic to the skillet and cook for an additional 1-2 minutes until fragrant. Remove from heat.
In a large bowl, combine grated zucchini, sautéed onion and garlic, eggs, milk, cheese, salt, and pepper.
Pour the filling into the prepared pie crust, smoothing the top with a spatula.
Bake the pie in the preheated oven for about 40-45 minutes, until the top is golden brown and the filling is set.
Let the pie cool for at least 10 minutes before slicing and serving.