Preheat the oven: Set your oven to 375°F (190°C). Grease a baking dish with butter or cooking spray.
Prepare the squash: Cut the spaghetti squash in half lengthwise and scoop out the seeds. Place the halves cut side down on a baking sheet lined with parchment paper. Roast for 30–40 minutes, or until the squash is tender and easily pierced with a fork.
Shred the squash: Once roasted, use a fork to scrape the flesh of the squash into spaghetti-like strands. Set aside.
Sauté aromatics: In a large skillet, melt butter over medium heat. Add the chopped onion and minced garlic, cooking for 2–3 minutes until softened and fragrant.
Combine ingredients: Stir in the sour cream, ½ cup of cheddar cheese, salt, pepper, and paprika. Cook for another 2–3 minutes until the cheese is melted and the mixture is smooth.
Mix squash and sauce: Add the cooked spaghetti squash strands to the skillet, mixing well to combine.
Transfer to baking dish: Transfer the mixture to the prepared baking dish.
Add toppings: Sprinkle the remaining ½ cup of shredded cheddar cheese and grated Parmesan over the top.
Bake: Bake for 15–20 minutes, or until the top is golden and bubbly.
Serve: Serve warm and enjoy the creamy, cheesy goodness of this spaghetti squash gratin!