Cook the spaghetti according to the package instructions in a large pot of salted boiling water until al dente. Drain and set aside.
In a large skillet or saucepan, heat some olive oil over medium heat. Add the ground beef and cook until browned, breaking it up with a spoon as it cooks.
Add the chopped onion, garlic, carrot, and celery to the skillet. Cook until the vegetables are softened and the onion is translucent.
Stir in the crushed tomatoes, tomato paste, beef broth, and red wine (if using). Mix well to combine.
Add the dried oregano, dried basil, sugar, salt, and pepper to the sauce. Stir to incorporate the seasonings.
Reduce the heat to low and simmer the sauce for about 20-30 minutes, stirring occasionally to prevent sticking.
Taste the sauce and adjust the seasoning if needed.
Serve the spaghetti on individual plates or a large serving dish. Ladle the meat sauce over the spaghetti.
Garnish with grated Parmesan cheese and fresh basil leaves, if desired.