In a large pot of salted boiling water, cook the spaghetti according to the package instructions until al dente. Reserve 1/2 cup of the pasta water, then drain the pasta and set aside.
In the same pot, heat the olive oil over medium heat. Add minced garlic and sauté for about 1 minute until fragrant but not browned.
Stir in the diced tomatoes with their juices, and add sugar, salt, and pepper. If you like a bit of spice, add the red pepper flakes at this point. Cook for about 5-7 minutes, allowing the sauce to thicken slightly.
Add the cooked pasta to the tomato sauce. Toss to coat the spaghetti, adding a splash of the reserved pasta water if the sauce seems too thick.
Remove from heat and fold in the chopped fresh basil until well combined. Adjust seasoning with more salt and pepper to taste.
Serve immediately, dividing the pasta into bowls. Top with grated Parmesan cheese if desired.
Notes
Garnish each plate with a sprig of fresh basil and a light drizzle of olive oil for an elegant touch.