Preheat the oven to 375°F (190°C).
In a large skillet, heat olive oil over medium heat. Add the diced onion and sauté until translucent, about 5 minutes.
Add the minced garlic and sausage to the skillet, cooking for an additional 5-7 minutes until browned.
Stir in the cubed sweet potatoes and dried thyme, ensuring everything is well combined. Season with salt and pepper.
Transfer the mixture to a greased 9x13-inch baking dish and spread it out evenly.
Top the mixture with the shredded cheddar cheese, covering it completely.
Cover with foil and bake in the preheated oven for 30 minutes. Remove the foil and bake for an additional 15-20 minutes until the cheese is bubbly and the sweet potatoes are tender.
Let the casserole cool for a few minutes before serving.