Preheat oven to 400 °F.
Cut spaghetti squash in half, lengthwise, Spoon out and discard the seeds, and place the halves cut-side up on a baking dish. Bake for 30 - 40 minutes until fork tender. Remove from oven and cool.
In the meantime, heat the 2 Tbsp. olive oil in a large saucepan. Add the garlic cloves and rosemary and cook on medium until fragrant, about 2-3 minutes. Add the pureed tomatoes and a pinch of salt. Simmer uncovered for 20 minutes to thicken slightly, stirring occasionally.
When the squash halves are cool enough to touch, use a fork and scrape out the insides. The action of scraping the fork over the meat of the spaghetti squash will miraculously create noodles. The spaghetti squash is unique in this feature. Continue until all of the flesh is removed from the squash halves. Collect the "noodles" in a bowl.
Heat 1 Tbsp. olive oil in a medium saucepan and add the chopped onion. Saute until fragrant, about 2-3 minutes. Add the spaghetti squash. Stir and cook for 7 minutes until slightly softened. Deglaze with 1 Tbsp. of red or white wine vinegar and cook 2 more minutes, stirring often.
Add the cooked spaghetti squash to the tomato sauce and stir. Heat for a few minutes so the squash noodles absorb the flavor of the tomato sauce.
Serve immediately. Garnish with fresh mint, ricotta cheese, or eat as is.