In a large skillet or frying pan, heat a bit of oil over medium heat. Add the chopped onion and garlic, and cook until softened.
Add the ground beef and cook until browned, breaking it up with a spoon.
Stir in the grated carrot, frozen peas, tomato paste, Worcestershire sauce, soy sauce, and thyme. Cook for a few minutes.
Sprinkle the flour over the mixture and stir well to combine. Cook for another minute.
Gradually pour in the beef stock while stirring. Bring to a simmer and cook until the mixture thickens. Season with salt and black pepper to taste.
Remove from heat and let cool slightly.
Preheat your oven to 375°F (190°C).
Roll out the puff pastry or pie crust on a lightly floured surface. If using pre-made puff pastry, you may need to cut it to fit your pie dish.
Line a pie dish with the pastry, trimming any excess. If using a pie crust, you can roll out the second crust for the top layer or use just one crust for a single-crust pie.
Spread the beef filling evenly in the pie dish.
Sprinkle shredded cheese on top of the filling.
If using a top layer of pastry, place it over the filling, crimping the edges to seal. If using a single crust, you can add a lattice design or leave it open.
Brush the top with the beaten egg to give it a golden color.
Bake in the preheated oven for 25-30 minutes, or until the pastry is golden and crispy.
Let the pie cool for a few minutes before slicing and serving.
Enjoy your meal!