Cook the spaghetti noodles according to the package instructions until al dente. Reserve 1 cup of the pasta water.
While the pasta is cooking, heat a large skillet over medium heat. Add olive oil and chopped garlic to the pan, cooking until the garlic is fragrant and lightly golden.
Add the whole tomatoes (including the juice), 1 teaspoon salt, black pepper, and fresh basil. Cook for about 10 minutes, until the tomatoes have started to break down and release their juices.
Use a masher to break down the tomatoes. Reduce the heat to low and add the cooked pasta to the skillet, along with 1/4 cup of the pasta cooking water. Toss everything together until the pasta is well-coated in the tomato sauce.