Preheat the oven to 400°F. Lightly spray a 1.5-quart baking dish with olive oil cooking spray.
Microwave the squash:
Pierce the spaghetti squash in a few spots with a sharp knife. Microwave it for 6 minutes; turn to the other side and microwave for 6 more minutes until soft to the touch. Let it stand for 5 minutes to finish cooking.
Using a sharp knife, cut the spaghetti squash in half lengthwise. Allow it to cool for 5 minutes until it's easier to handle. Scoop out the pulp and seeds from the center, then rake a fork back and forth to remove strands of the flesh onto a bowl. Set aside.
Prepare the casserole:
In a large bowl, lightly whisk the egg. Add the sour cream, kosher salt, black pepper, dried thyme, and minced garlic. Whisk until smooth.
Mix in the cooked spaghetti squash and the shredded cheese.
Transfer the mixture to the prepared baking dish. Bake until browned, about 40 minutes (it will smell wonderful!).
Allow the casserole to cool for 10 minutes, then scoop it onto plates or carefully cut it into squares and serve.
Or add a cup of cooked and shredded grilled chicken breast plus an extra ¼ cup of sour cream and turn this casserole into a complete meal.
Thanks to the addition of egg, this casserole is sturdy enough to cut into squares. If you'd like to omit the egg, increase the sour cream to ¾ cup and use a large spoon to scoop the casserole onto plates.
You can keep the leftovers in the fridge, in a sealed container, for up to 4 days. Reheat them gently in the microwave at 50% power. You can also freeze this casserole. Allow it to cool completely, then wrap it in a plastic wrap layer and then foil. It can be frozen for up to three months.
You can double this recipe and bake the casserole in a 3.5-quart baking dish, such as the Dutch oven shown in the photos on this page, or a 9 X 13-inch baking dish.