Preheat the oven to 375F and prepare and baking dish with cooking spray.
In a large bowl, add the broccoli, mayo, and all the grated cheddar except for ½ cup. Set aside.
In a medium skillet, heat the butter with the onion, salt, and pepper over medium heat. Stir for a few minutes until the onion turns translucent and starts to soften.
Sprinkle the flour over the onion and add the garlic to the skillet. Stir to combine; the mixture will become thick and pasty. Let the flour cook into the butter for 1 minute.
Slowly stream in the milk or half and half, stirring as you go, to combine with the flour and onions. Let the mixture bubble and thicken, then turn the heat off.
Pour the milk mixture over the broccoli/cheese/mayo, stir well to combine everything. Transfer the mixture into the prepared baking dish.
Cover the casserole, and bake for 20 minutes at 375F. Remove from the oven and STIR to distribute the cheese sauce evenly.
Top the casserole with the reserved cheddar and the crushed crackers, then return to the oven uncovered for 20-30 minutes until the broccoli is tender and the casserole is bubbly. Serve with your favorite dinner.