Roast the squash: Preheat oven to 400°F. Cut the spaghetti squash in half lengthwise, scoop out seeds, and place cut-side down on a baking sheet. Roast for 35–40 minutes or until tender.
Prepare bacon: In a large skillet, cook diced bacon or pancetta until crispy. Remove and set aside, leaving some rendered fat in the pan.
Mix the sauce: In a bowl, whisk together egg yolks, heavy cream, and Parmesan. Season with black pepper.
Combine: When the squash is done, shred it into strands with a fork. Add to the skillet with a bit of butter and minced garlic (if using).
Create the carbonara: Remove the skillet from heat, then slowly pour in the egg mixture, stirring constantly so the eggs don’t scramble. The heat will thicken the sauce into a creamy coating.
Add bacon: Stir in the crispy bacon and adjust seasoning with salt and pepper.
Serve: Plate with extra Parmesan, freshly cracked pepper, and a sprinkle of parsley or chives.