Preheat the Oven: Preheat your oven to 375°F (190°C).
Cook the Sausage: In a large skillet, heat olive oil over medium heat. Add the sausage and cook, breaking it apart with a spoon, until browned and cooked through, about 5-7 minutes. Remove from the skillet and set aside.
Sauté the Vegetables: In the same skillet, add the chopped onion and garlic. Sauté for 2-3 minutes until softened.
Prepare the Casserole: In a large mixing bowl, combine the diced potatoes, cooked sausage, sautéed onions and garlic, green beans, milk, dried thyme, salt, and pepper. Mix well to combine.
Assemble in Baking Dish: Transfer the mixture to a greased 9x13-inch baking dish. Spread evenly and top with shredded cheddar cheese.
Cover and Bake: Cover the baking dish with aluminum foil and bake for 30 minutes.
Uncover and Bake Until Golden: Remove the foil and bake for an additional 15-20 minutes, or until the potatoes are tender and the cheese is golden and bubbly.
Garnish and Serve: Remove from the oven and let cool for a few minutes before serving. Garnish with chopped fresh parsley, if desired.