Prep the squash. Preheat your oven to 400°F (200°C).
Slice the spaghetti squash in half lengthwise. Scoop out the seeds with a spoon.
Season and roast. Drizzle the cut sides with 1 tablespoon olive oil and season with salt and pepper. Place cut side down on a lined baking sheet.
Roast for 35–45 minutes, until the strands pull away easily with a fork and are tender but not soggy.
Start the sauce. While the squash roasts, warm 1 tablespoon olive oil in a saucepan over medium heat. Add the chopped onion with a pinch of salt and cook for 5–7 minutes until soft and translucent.
Add garlic and spices. Stir in the garlic, oregano, dried basil, and red pepper flakes (if using). Cook for 30–60 seconds, just until fragrant.
Simmer the tomatoes. Pour in the crushed tomatoes.
Add a pinch of sugar or a splash of balsamic if your tomatoes taste sharp. Season with salt and pepper. Simmer gently, partially covered, for 15–20 minutes, stirring occasionally.
Taste and adjust. Turn off the heat.
If you’re using fresh basil, stir in a handful now. Adjust salt, pepper, and heat level to taste.
Shred the squash. When the squash is done, let it cool for a few minutes. Use a fork to scrape out the strands into a bowl.
Toss with a pinch of salt and pepper for flavor.
Combine and serve. Plate the squash strands and ladle warm marinara on top. Finish with grated Parmesan and chopped fresh herbs. Add a drizzle of olive oil for a silky finish.