In a large pot over medium heat, melt 1 tbsp of butter and sauté the gnocchi until golden. Remove and set aside.
Add 2 more tbsp of butter to the same pot and sauté the chopped leek and minced garlic until softened (about 3-4 minutes).
Stir in the chopped carrot and potato, cooking until slightly golden. Season with salt and pepper.
Deglaze the pot with white wine, stirring until most of the liquid is absorbed.
Pour in the chicken stock and bring to a simmer with a fresh thyme sprig, partially covering the pot. Cook until the potatoes are tender, about 15 minutes.
Remove the thyme sprig and mash some of the potatoes with a fork to thicken the soup, leaving some texture.
Stir in the chopped ham and heavy cream until fully combined.
Serve hot, garnished with crispy gnocchi, fresh thyme, dill, and cracked black pepper.