Preheat the oven to 400°F (205°C).
In a bowl, mix ground beef, breadcrumbs, eggs, grated onion, garlic, Parmesan cheese, salt, and pepper until just combined.
Shape the mixture into golf-ball-size meatballs.
Place meatballs on a lightly greased baking pan with space between them.
Bake meatballs for 20 minutes, then remove from the oven.
While meatballs bake, sauté onion and garlic in a pan until fragrant.
Season with salt, pepper, Italian herbs, and chili flakes.
Pour in tomato sauce and water, then simmer for 15 minutes.
Cook spaghetti 1–2 minutes less than package directions and drain.
Toss spaghetti with butter or reserved beef fat.
Preheat oven to 350°F (175°C).
Layer spaghetti, sauce, meatballs, mozzarella, and Parmesan in a baking dish.
Finish with extra sauce and cheese on top.
Bake uncovered for 30 minutes until bubbly and golden.