Bring a large pot of salted water to a boil, then add spaghetti or linguine and cook until just shy of al dente, about 8 minutes. Drain and set aside.
While pasta cooks, heat 3 tablespoons of olive oil in a large skillet over medium heat until shimmering and fragrant.
Add the minced garlic to the skillet and sauté for about 30 seconds until it becomes fragrant and lightly golden, making your kitchen smell inviting.
Add the chopped olives, capers, and sun-dried tomatoes to the skillet. Stir well and cook for 2 minutes, allowing the flavors to meld and the mixture to become aromatic and slightly pulpy.
Pour in the canned diced tomatoes or fresh chopped cherry tomatoes. Stir everything together, reduce the heat to medium-low, and simmer uncovered for about 15 minutes, stirring occasionally, until the sauce thickens and deepens in color.
Taste the sauce and add salt and pepper as needed, adjusting for saltiness and brightness. If it’s too salty, a squeeze of lemon can help balance the flavors.
Add the cooked pasta to the skillet, tossing gently to coat each strand thoroughly in the vibrant sauce. If the mixture feels thick, splash in a little reserved pasta water to loosen it up and help the sauce cling.
Cook together for another 1-2 minutes over low heat, allowing the flavors to meld and the pasta to soak up the savory, briny goodness.
Transfer the pasta to serving plates, sprinkle with freshly chopped parsley or basil, and finish with a drizzle of olive oil for extra richness and shine.
Serve immediately while hot, enjoying the lively, punchy flavors and the satisfying texture of the pasta coated in that bold, briny sauce.