Preheat the oven to 350F
Grease the bottom and sides of your oven safe pan or casserole dish.
To a hot frying pan, add your olive oil and onions and cook until the onions are just beginning to soften ~ about 3 minutes.
To the pan, add your squash. Cook for about 25 minutes on medium - medium low, adjusting temperature as needed to not burn. You're aiming to cook the liquid from the squash and drain. You can do this by spooning the liquid out, or using a mesh strainer and then returning the softened squash to the pan.
Add the garlic, salt, and pepepr and continue cooking until fragrant - about 3-4 minutes. Turn off heat.
In a separate bowl, mix the egg, butter, sour cream, mayonnaise, soup, and most of the cheese, and the thyme. Save some to sprinkle on top before the crackers.
Add the cooked squash and mix to thoroughly coat the squash. Add to the casserole dish and sprinkle lightly with remaining cheese.
Take the ritz crackers and put them in a large baggie. Beat them with a rolling pin to crumble.
Melt the butter and pour into the bag, massaging the crumbs so that they are coated with butter.
Sprinkle the crumb mixture over the top of the casserole, covering a thick layer. Don't be shy - if you need to go back and crumble up some more crackers.... get on it!
Bake in the oven for about 30-40 minutes until the cracker crust is a golden bubbly brown.