01 - Preheat oven to 400°F.
02 - Season beef cubes generously with salt and pepper. Heat olive oil in a large Dutch oven or heavy-bottomed pot over medium-high heat. Brown beef in batches without overcrowding, transferring browned pieces to a plate.
03 - Reduce heat to medium. Add butter to the pot, then sauté onions, carrots, celery, and potatoes for 5 minutes until softened. Add garlic and cook 1 minute more until fragrant.
04 - Stir in flour and cook for 1 minute to remove raw taste. Add tomato paste, mixing thoroughly to combine.
05 - Pour in red wine if using and deglaze the pot, scraping up any browned bits from the bottom. Add beef stock, Worcestershire sauce, thyme, and bay leaf. Return beef and any accumulated juices to the pot.
06 - Bring to a simmer, cover, and cook over low heat for 1 hour, stirring occasionally, until beef is fork-tender.
07 - Discard bay leaf. Stir in peas and cook 2 minutes until heated through. Taste and adjust seasoning with additional salt and pepper as needed.
08 - Transfer beef mixture to a 2-quart baking dish.
09 - Drape puff pastry over the filling, trimming excess and pressing edges firmly to seal. Cut several small slits in the pastry to allow steam escape during baking. Brush entire surface with beaten egg.
10 - Bake for 25 to 30 minutes until pastry is deep golden brown and crisp. Cool for 10 minutes before serving to allow filling to set.