Peel and dice the potatoes, then place them in a pot of salted boiling water. Cook until fork-tender, about 15 minutes, and drain well.
While the potatoes cook, heat a large skillet over medium-high heat. Add a splash of oil, then sauté chopped onions and minced garlic until fragrant and translucent, about 3-4 minutes.
Push the onions and garlic to one side of the pan. Add the ground meat and cook, breaking it apart with a spatula, until browned and caramelized, about 5-7 minutes.
Stir in diced carrots and cook for another 3 minutes, then pour in beef broth. Add thyme or rosemary, salt, and pepper. Let simmer until the mixture thickens slightly and vegetables soften, about 8 minutes.
Meanwhile, mash the drained potatoes with butter and cream until smooth and fluffy. Season with salt and pepper to taste.
Preheat your oven to 200°C (390°F). Transfer the meat mixture into a baking dish, spreading it evenly.
Spread the mashed potatoes over the filling, creating gentle peaks with a fork to help it crisp up. If desired, sprinkle grated cheese on top.
Bake in the oven for 25-30 minutes, until the top is golden and bubbling around the edges.
Remove from oven and let rest for 5 minutes, allowing the layers to set for cleaner slices and easier serving.
Slice and serve hot, enjoying the crispy topping and hearty filling, perfect for a cozy dinner.