Preheat your oven to 400°F (200°C). Line a baking sheet with parchment paper.
Place the salmon fillets on the prepared baking sheet. Drizzle with olive oil and season with salt, black pepper, and red pepper flakes. Bake for 12-15 minutes, or until the salmon is cooked through and flakes easily with a fork.
While the salmon is baking, cook the spaghetti according to package instructions until al dente. Drain and set aside, reserving 1/2 cup of pasta water.
In a large skillet over medium heat, add a splash of olive oil. Sauté the minced garlic until fragrant, about 1 minute.
Add the diced tomatoes, tomato paste, oregano, and sugar to the skillet. Stir well and let simmer for about 5-7 minutes, allowing the sauce to thicken slightly.
Toss the cooked spaghetti into the sauce, adding reserved pasta water as needed to reach desired consistency. Stir in the fresh basil.
Serve the spaghetti topped with the baked salmon and a sprinkle of grated Parmesan cheese.