Start by preheating your oven to 400°F. Carefully cut the spaghetti squash in half lengthwise and scoop out the seeds. Drizzle the cut sides with olive oil and sprinkle lightly with salt and pepper.
Place the squash halves cut-side down on a lined baking sheet. Roast them in the oven for about 40 minutes until the flesh is tender. You should be able to pierce it easily with a fork.
While the squash is roasting, heat olive oil in a skillet over medium heat. Add minced garlic and cook until fragrant, being careful not to let it brown. Stir in crushed tomatoes, tomato paste, Italian seasoning, salt, pepper, and red pepper flakes.
Lower the heat and let the sauce simmer gently for about 15 minutes. This allows the flavors to meld and the sauce to thicken slightly. Stir occasionally to prevent sticking.
Once the squash is done roasting, let it cool slightly. Use a fork to scrape the flesh into long, spaghetti-like strands. Transfer them to a large bowl or directly into the skillet.
Add the spaghetti squash strands to the tomato sauce and toss gently to coat. Remove from heat and stir in fresh basil. Top with freshly grated Parmesan just before serving.