This is hands-down the best way tocook spaghetti squash. You cut it into rings, roast it up and the result is long, pasta-like strands that aren't watery!
Preheat your oven to 400°F. Slice ends off the squash, then cut widthwise into rings, making sure the rings are about the same size, around 1½ inches thick.
Use a spoon to scrape out the seeds. (I love using a grapefruit spoon for this.)
Place squash on rimmed baking sheet and use your hands to coat each ring with a little olive oil, salt and pepper.
Bake for 30-40 minutes, flipping rings once about 15 minutes in.
Allow to cool for about 15 minutes, then peel the skin away and separate the strands into long spaghetti noodles using a fork.
Notes
Other ways to cook spaghetti squash:
Roast Whole: This method might be the easiest, because the prep is so minimal, but I don't love this method because it takes a long time and the squash is sort of steamed which results in wet/watery strands. Preheat your oven to 375°F degrees. Use a knife to prick a few holes in the squash. Place on a rimmed baking sheet and bake for about 1 hour and 20 minutes (flipping half way through). You'll know the squash is done when it feels tender when pierced with a knife. Let squash cool before cutting it open, scooping out seeds and separating the strands.
Cut Lengthwise and Roast: This method works great if you're making spaghetti squash bowls or boats, but it's not my go-to because you'll get shorter strands and the squash is a bit wet or watery. Preheat your oven to 400°F. Slice your spaghetti squash in half, lengthwise. Scoop out the seeds and drizzle with olive oil, salt and pepper. Flip your halves over so the cut side is on a baking sheet and bake for about 45 minutes. You know your squash is done when you can press in the skin fairly easily. Remove from the oven and let cool for about 15 minutes and then use a fork to scrape out/shred the inner part, making "spaghetti noodles".
Microwave - This is my least favorite option, but if you're in a pinch you can use your microwave to cook spaghetti squash. Slice your squash in half, lengthwise or widthwise. Scoop out the seeds and place the cut side down in a microwave-safe dish. Fill the dish with about 1 inch of water. Microwave on high for 10-12 minutes or until you can press into the skin fairly easily. Remove and let cool for about 15 minutes and then use a fork to scrape out/shred the inner part, making "spaghetti noodles". Just note that your squash will be cooked but it will likely be watery and won't have as much flavor as roasted spaghetti squash.