Slice the squash into thin rounds (about 1/4-inch thick). You can also cut the squash into half-moons if preferred.
In a large skillet, melt 2 tablespoons of butter over medium heat. Add the sliced squash and chopped onion, cooking for about 5-7 minutes until the squash is tender and the onions are soft. Stir occasionally.
Once the squash is tender, remove from heat and drain any excess liquid from the pan to prevent the casserole from becoming too watery.
Make the Casserole Mixture:
In a large mixing bowl, combine the mayonnaise, shredded cheddar cheese, beaten egg, garlic powder, onion powder, salt, and black pepper.
Add the cooked squash and onion mixture to the bowl and stir gently to combine, making sure the squash is evenly coated with the creamy mixture.
Prepare the Topping:
In a separate bowl, combine the crushed buttery crackers or panko breadcrumbs with 2 tablespoons of melted butter. Stir until the crumbs are coated and well mixed.
Assemble the Casserole:
Transfer the squash mixture into a greased 9×13-inch baking dish, spreading it evenly.
Sprinkle the cheesy squash mixture with the prepared cracker or breadcrumb topping, then add a little extra shredded cheddar cheese on top for a golden, melty finish.
Optional: Lightly sprinkle with paprika for extra color.
Bake the Casserole:
Preheat your oven to 350°F (175°C).
Bake the casserole for about 25-30 minutes, or until the top is golden brown and the casserole is bubbly around the edges.
Serve:
Let the casserole rest for 5 minutes before serving. This will help it set and make it easier to scoop.