Preheat your oven to 400°F (200°C) if roasting the meatballs.
In a mixing bowl, combine the ground beef, breadcrumbs, Parmesan cheese, parsley, egg, minced garlic, salt, and pepper. Mix until well combined.
Form the mixture into meatballs, about 1 inch in diameter.
Heat olive oil in a skillet over medium heat. Brown the meatballs on all sides, about 5-7 minutes. Alternatively, place the meatballs on a baking tray and roast in the oven for 20 minutes.
In a large pot, heat 1 tablespoon of olive oil over medium heat. Add chopped onion and cook until softened, about 5 minutes.
Stir in minced garlic and cook for an additional minute until fragrant.
Add crushed tomatoes, oregano, basil, salt, and pepper to the pot. Simmer for 10 minutes.
Add the browned meatballs to the sauce and allow to simmer for another 15 minutes to let flavors meld.
While the sauce simmers, cook the spaghetti according to package instructions in a large pot of salted boiling water until al dente. Drain using a colander.
Serve the spaghetti topped with meatballs and sauce. Garnish with grated Parmesan cheese and fresh basil, if desired.