Bring a large pot of salted water to a boil and cook the pasta according to package instructions until al dente. Drain and set aside.
While the pasta cooks, heat olive oil in a large skillet over medium heat.
Add minced garlic and sauté for about 1 minute until fragrant, being careful not to burn it.
Add diced tomatoes to the skillet and cook for 5–7 minutes, stirring occasionally, until they soften and release their juices.
Season the tomato mixture with salt, black pepper, and red pepper flakes if using.
Toss the cooked pasta into the skillet with the tomato sauce and mix well to combine.
Remove from heat and stir in chopped fresh basil leaves.
Serve pasta topped with grated Parmesan cheese and an extra drizzle of olive oil if desired.