Boil the diced potatoes in salted water until they are tender. Drain and mash them with milk, butter, salt, and pepper until smooth. Set aside.
In a large skillet, cook ground beef or lamb over medium-high heat until browned. Drain any excess fat.
Add chopped onions and minced garlic to the skillet. Cook until the onions are softened. Stir in frozen peas, frozen diced carrots, tomato paste, Worcestershire sauce, dried thyme, salt, and pepper. Cook for an additional 5-7 minutes until the vegetables are heated through. Pour in the beef or vegetable broth and simmer for a few more minutes until the mixture thickens.
Transfer the filling into a greased baking dish, spreading it evenly. Spoon the mashed potatoes on top of the filling, spreading them to cover the entire surface. You can use a fork to create a decorative pattern on top.
Place the baking dish in the preheated oven and bake for approximately 20-25 minutes or until the top is golden brown. Allow the Shepherd’s Pie to cool for a few minutes before serving.