Preheat your oven to 400°F. Grease a 2-quart baking dish with cooking spray or butter.
Pour olive oil into a large skillet over medium-high heat. Let the oil heat for about 2 minutes until hot.
Add ground beef and chopped onions to the hot skillet. Break up the meat with a wooden spoon and stir occasionally. Cook for about 5 minutes until the beef is fully browned and onions are soft.
Drain any excess liquid from the skillet by tilting the pan and using your spoon to hold back the meat.
Add salt, pepper, and garlic to the beef mixture. Stir together and cook for 1 more minute.
Turn off the heat. Add mayo, ketchup, and mustard to the beef. Mix until smooth and creamy.
Add 1 cup of shredded cheddar cheese to the beef mixture (reserve remaining 1/2 cup for topping). Stir until the cheese melts into the mixture.
Transfer the beef mixture to the prepared baking dish and spread evenly. Sprinkle the reserved cheese on top, covering the entire surface.
Bake for 15 minutes until the cheese is completely melted and golden brown in spots. For extra-crispy cheese, broil for 1-2 minutes, watching carefully.
Let the casserole rest for 5 minutes before serving.