Preheat your oven to 400 degrees F. Spray a 2-quart baking dish with olive oil.
Heat the olive oil in a large skillet over medium-high heat, about 2 minutes. Add the beef and the onions. Cook, stirring to break up the beef, until the meat is browned and the onion is soft, about 5 minutes.
If there are liquids at the bottom of the skillet, carefuly drain the mixture and return it to the skillet.
Stir in the kosher salt, black pepper, and garlic. Cook, stirring, 1 more minute.
Turn the heat off. Stir in the mayonnaise, unsweetened ketchup, mustard, and 1 cup cheddar.
Transfer the mixture to the prepared baking dish. Sprinkle with the remaining cheese.
Bake until the cheese is melted and the casserole is heated through, about 15 minutes. Or, if your baking dish is broiler-safe, broil the casserole 6 inches below the heating element (not directly below) until the cheese is melted, 1-2 minutes.
If you'd like to turn this casserole into a complete meal, you can add 1-2 cups of uncooked riced cauliflower to the meat and onion and cook everything together. You might need to increase the olive oil a little if you do.