01 - Preheat oven to 375°F. Grease a large casserole dish thoroughly.
02 - Heat olive oil in a skillet over medium heat. Sauté onions until softened, about 3 minutes. Add garlic and cook another minute.
03 - Add ground beef, salt, black pepper, paprika, and thyme to the skillet. Cook until beef is fully browned, breaking up clumps. Drain excess fat if necessary.
04 - Pour in beef stock and simmer for 5 minutes to meld flavors. Remove from heat afterward.
05 - Arrange half of the sliced potatoes evenly in the casserole dish. Spread the beef mixture over the potatoes.
06 - Dollop sour cream evenly over the beef layer, lightly spreading it. Top with the remaining sliced potatoes.
07 - Evenly pour whole milk over the assembled layers. Cover the dish tightly with aluminum foil.
08 - Bake in preheated oven for 40 minutes, covered.
09 - Remove foil, sprinkle shredded cheddar cheese evenly on top, and bake uncovered for 15 to 20 minutes until cheese is golden and potatoes are tender.
10 - Allow casserole to rest for 10 minutes before serving. Garnish with fresh parsley if desired.