Preheat and prep: Heat your oven to 400°F (205°C).
Line a baking sheet with parchment for easy cleanup.
Cut the squash: Carefully 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. Season with salt and pepper.
Place cut side down on the baking sheet and roast for 35–45 minutes, until the skin gives slightly when pressed and the strands pull away easily with a fork.
Cool and shred: Let the squash cool for 5–10 minutes. Use a fork to scrape the flesh into spaghetti-like strands. Transfer to a large bowl and pat gently with paper towels to remove excess moisture.
Warm the aromatics (optional but great): In a large skillet over medium heat, add the remaining 1 tablespoon olive oil and the butter.
When melted, add minced garlic and red pepper flakes. Cook 30–60 seconds until fragrant. Don’t brown the garlic.
Toss with pesto: Add the squash strands to the skillet and toss to coat.
Stir in the pesto and mix until everything is evenly green and glossy. If the mixture looks dry, add a splash of water or a drizzle of olive oil.
Add cheese and brighten: Sprinkle in the Parmesan and toss until it melts into the squash. Squeeze in fresh lemon juice to wake up the flavors.
Taste and adjust salt and pepper.
Garnish and serve: Top with more Parmesan, fresh basil, and a handful of toasted nuts if you like. Serve hot.