01 - Set the oven to 400°F (200°C) to preheat.
02 - Place peeled and cubed potatoes into salted boiling water; cook until tender, approximately 15 to 20 minutes. Drain thoroughly.
03 - Mash potatoes with butter and milk until smooth. Season with salt and pepper. Incorporate the egg yolk if using. Set aside.
04 - Heat olive oil in a large skillet over medium heat. Add onion, garlic, and diced carrots; sauté until softened, about 5 minutes.
05 - Add ground beef to the skillet, breaking it up with a spoon. Cook until fully browned and no longer pink, about 7 to 8 minutes.
06 - Stir in tomato paste, Worcestershire sauce, thyme, rosemary, salt, and pepper. Cook for an additional 2 minutes to meld flavors.
07 - Sprinkle flour evenly over the mixture and stir to combine. Cook for 1 minute to remove raw flour flavor.
08 - Pour in beef broth gradually, stirring to deglaze the pan and incorporate browned bits. Simmer for 5 minutes until mixture thickens.
09 - Add frozen peas and cook for 2 more minutes until heated through.
10 - Transfer beef filling into a baking dish. Spoon mashed potatoes over the top and spread evenly. Optionally, use a fork to create a decorative pattern.
11 - Place assembled dish in the oven and bake for 20 to 25 minutes, until the topping is golden and filling is bubbling.
12 - Allow the dish to rest for 10 minutes to set before serving.