Add the olive oil to a large skillet and let it warm. Add the garlic, sliced onions, and salt and pepper.
Let cook until lightly golden, stirring occasionally as not to burn.
Once slightly caramelized, deglaze the pan with white wine and let the liquid reduce 5-7 minutes.
Once reduced, add in the mushrooms and cook until tender.
Stir in fresh thyme.
Add in the spinach and cover the skillet until spinach wilts slightly.
Remove from heat.
To serve, plate the cooked spaghetti squash, spoon the cream sauce over it and top with the mushroom mixture.