Preheat your oven to 200°C (400°F).
In a large skillet, cook the ground beef over medium heat until browned. Drain excess fat.
Add the chopped onion and minced garlic to the skillet and cook until the onion is translucent.
Stir in the flour and cook for an additional minute.
Gradually add the beef broth, stirring constantly until the mixture thickens.
Season with salt and pepper to taste and simmer for an additional 5 minutes.
Roll out the puff pastry and line a pie dish with one sheet. Add the beef mixture into the pie dish.
Cover the pie with another sheet of puff pastry, seal the edges, and brush the top with the beaten egg.
Make a few small slits in the top of the pie to allow steam to escape.
Bake in the preheated oven for 30-40 minutes, or until the pastry is golden brown.
Allow to cool slightly before slicing and serving.