Bring a large pot of salted water to a rolling boil, then add the spaghetti and cook until just al dente, about 8-10 minutes. Drain and set aside, reserving a cup of pasta water.
While the pasta cooks, heat the olive oil in a deep skillet over medium heat until shimmering and fragrant.
Add the sliced garlic to the oil and sauté for about 30-40 seconds, or until just golden and aromatic—be careful not to burn it.
Add the chopped tomatoes to the skillet with garlic, stirring gently. Reduce the heat to low and let simmer for about 10 minutes, stirring occasionally, until the tomatoes break down slightly and create a chunky sauce.
Season the sauce with salt, freshly cracked black pepper, and chili flakes if using. Taste and adjust seasoning as needed.
Gently toss the drained spaghetti into the skillet with the simmered tomato sauce, adding a splash of reserved pasta water to loosen if the sauce feels too thick. Cook together over low heat for 1-2 minutes to meld flavors.
Remove from heat and tear fresh basil leaves over the pasta, tossing gently to distribute their aroma and vibrant green color throughout the dish.
Finish with a drizzle of olive oil and an extra sprinkle of black pepper. Serve immediately while hot, garnished with more basil if desired.