Preheat the oven to 375 °F (190 °C).
In a large skillet over medium heat, cook ground beef and chopped onion until beef is browned and onion is softened.
Add minced garlic and cook for 30 to 60 seconds until fragrant.
Stir in ketchup, Worcestershire sauce, brown sugar (if using), mustard, salt, and black pepper.
Simmer the mixture for 5 to 7 minutes until the sauce thickens.
Add the cooked pasta to the beef mixture and stir until evenly coated.
Spread the beef and pasta mixture evenly into a greased baking dish.
Sprinkle shredded cheese over the top of the mixture.
Bake uncovered for 15 to 20 minutes until the cheese is melted and bubbly.
Serve warm, optionally topped with sliced pickles or extra mustard and ketchup.