Start by preheating your oven to 400°F (200°C). Melt the butter in a large skillet over medium heat. Add the onions, carrots, and celery, letting them cook for about 4-5 minutes until the onions are translucent.
Stir in the minced garlic and thyme, cooking just until fragrant, about 1 minute. Sprinkle the flour over the vegetables and stir well to combine. Cook for an additional 2 minutes, stirring frequently.
Gradually whisk in the chicken broth, making sure to eliminate any lumps. Once the mixture is smooth, add the milk or cream and bring to a low simmer, cooking until it begins to thicken, roughly 4 minutes.
Remove the pan from heat and fold in the shredded chicken and frozen peas. Season generously with salt and pepper to taste. Transfer this mixture into a baking dish or keep it in the skillet, whichever you prefer.
Lightly roll out the thawed puff pastry on a floured surface and cut it into squares or a shape that will fit atop your filling. Arrange the pastry over the top, allowing some overlap for a rustic look.
Brush the pastry with the egg wash and place the dish on a lined baking sheet to catch any drips. Bake for 30-35 minutes, or until the pastry is puffed and golden brown.
Let the pie cool for about 10 minutes before serving. This allows the filling to set slightly. Serve warm and enjoy your delicious chicken pot pie!