Bring a large pot of salted water to a rolling boil, then add spaghetti. I cook mine one minute under the package time because I prefer pasta with actual structure, not that soft paste some families accept. Stir immediately after adding so strands don't clump.
While pasta cooks, heat olive oil in a separate large skillet over medium heat. Add minced garlic and diced onion, stirring constantly for about 3 minutes until the onion softens and turns translucent at the edges. This is where flavors actually begin—if you skip this foundation, your sauce tastes thin and flat.
Add fresh tomatoes, dried oregano, and dried basil to the skillet, stirring to combine. Let everything simmer for 8–10 minutes without a lid, which lets excess moisture escape and concentrates tomato flavor. I always check at the 7-minute mark because my stove runs hot; yours might need the full time.
Drain pasta, reserving 1/2 cup pasta water before you dump it. Add hot pasta directly to the tomato skillet with the butter and salt, tossing everything together over low heat for about 2 minutes. The starch in that pasta water will help emulsify everything into a light coating—don't skip saving it.
Sprinkle mozzarella and Parmesan over the pasta while it's still hot, tossing gently until cheese melts into the sauce. If the sauce feels too thick, add pasta water one tablespoon at a time. This is the vulnerability moment: I've made this too thick countless times and learned this trick the hard way.
Remove from heat and fold in fresh basil, reserving a small handful for garnish. Fresh basil turns bitter and dark if you cook it too long, so this final addition is non-negotiable for tasting summer in every bite.