Peel the onions for the sauerkraut, dice them finely and sauté in the lard until translucent. Add the sauerkraut, sear and deglaze with the stock, add the spices and let everything simmer for approx. 45 minutes.
Peel and slice the potatoes and fry them in clarified butter.
Peel the onion and the cloves of garlic, add them to the potatoes with the diced ham, season everything with the spices for the fried potatoes, and fry them almost cooked.
Grease a baking dish, fill in half of the potatoes, then spread the sauerkraut on top, sprinkle with the sour cream, sprinkle with Gouda cheese and bake in a preheated oven at 200 ° C for about 30 minutes.