Steps
1. Cook the spaghetti according to package instructions until al dente. Drain and set aside.
2. Heat olive oil in a pan over medium heat. Add minced garlic and sauté for 1 minute until fragrant.
3. Add diced tomatoes to the pan, season with salt and pepper, and cook for 5-7 minutes until tomatoes soften and release juices.
4. Stir in chopped basil leaves and cook for another minute.
5. Toss the cooked spaghetti into the tomato sauce, mixing well to coat evenly.
6. Serve hot, topped with grated Parmesan cheese if desired.