Preheat oven to 400°F (200°C).
Heat olive oil in a skillet over medium heat. Add onion and garlic, sauté 3 minutes until fragrant.
Add ground beef and cook until browned.
Stir in flour to coat beef, then gradually pour in beef stock, Worcestershire sauce, tomato paste, and thyme.
Simmer 10 minutes, stirring until thickened. Season with salt and pepper. Remove from heat and cool slightly.
Line a greased 9-inch pie tin with shortcrust pastry.
Spoon beef mixture evenly into pastry shell.
Top with puff pastry, pressing edges to seal. Cut small slits on top.
Brush with beaten egg and bake for 30–35 minutes until golden.
Cool 10 minutes before serving.