Cook the spaghetti in heavily salted water per package directions. Drain, set aside, and keep warm.
Heat olive oil in a large pot over medium heat.
Add the garlic and red pepper flakes and let cook for a minute.
Place the onion in a food processor and puree. Add it to the pot and cook for 4 minutes.
Add the crushed tomatoes and stir.
Pick up the whole tomatoes and squish them with clean hands. Add them to the pot along with their juices.
Add the salt, pepper, and sugar.
Reduce the heat to low and cook for about 20 minutes with a lid on.
Remove the lid and add the herbs and Parmesan to the sauce.
Taste the sauce to ensure it is balanced. It should be fragrant, flavorful, and slightly sweet. Add more salt or sugar as needed.
Combine the pasta and sauce in a large serving dish. Toss gently.
Serve with a sprinkle of fresh basil and Parmesan cheese.