Heat a large skillet over medium heat and melt butter or warm oil.
Add thinly sliced onion and sauté until soft and translucent, about 5–7 minutes.
If using sausage, slice and brown it in the pan until caramelized; remove and set aside.
Add sauerkraut to the pan, breaking up large pieces with a spoon.
Stir in grated apple (if using) and sprinkle in caraway seeds and brown sugar.
Pour in 1/2 cup stock and a splash of reserved sauerkraut brine for extra tang.
Add bay leaf, reduce heat to low, cover, and simmer 12–15 minutes, stirring occasionally.
Uncover and taste; adjust sweetness or acidity with a little more sugar or brine.
Return browned sausage to the pan to warm through for 2–3 minutes.
Remove bay leaf, season with pepper (salt rarely needed), garnish with fresh dill, and serve hot.