Boil the peeled and diced potatoes in a large pot of salted water until tender. Drain the potatoes and mash them with butter, milk, salt, and pepper until smooth. Set aside.
In a large skillet, brown the ground beef or lamb over medium heat until fully cooked.
Add chopped onions, carrots, and garlic to the skillet. Sauté until the vegetables are tender. Stir in the flour and cook for 1-2 minutes to eliminate the raw flour taste.
Add tomato paste, Worcestershire sauce, and broth. Stir well to combine.
Bring the mixture to a simmer and let it cook until the liquid has thickened.
Add frozen peas and season with salt, pepper, and dried thyme. Simmer for an additional 5 minutes. Remove from heat.
Preheat the oven to 400°F (200°C).
Transfer the meat filling to a baking dish, spreading it evenly. Spoon the mashed potatoes over the meat, spreading them with a spatula to cover the filling completely. Use a fork to create a decorative pattern on the surface of the mashed potatoes.
Place the baking dish in the preheated oven and bake for 20-25 minutes or until the mashed potatoes are golden brown and the filling is bubbling around the edges.
Remove from the oven and let it cool for a few minutes before serving.