Preheat oven to 350°F (175°C). Grease a 9x13-inch baking dish.
Bring a large pot of salted water to a boil. Add sliced squash and cook for 5–7 minutes until tender. Drain well and let cool slightly.
In a large bowl, combine cooked squash, chopped onion, cheddar cheese, mayonnaise, melted butter, beaten egg, salt, pepper, and garlic powder. Mix until well combined.
Transfer the mixture to the prepared baking dish and spread evenly.
Sprinkle the crushed Ritz crackers evenly over the top.
Bake for 40–45 minutes, or until the top is golden brown and the casserole is bubbly.
Let cool for 5–10 minutes before serving.
Notes
Serve warm as a side dish with grilled meats or enjoy as a comforting vegetarian main. Leftovers can be refrigerated for up to 3 days.