Peel the butternut squash. Halve it lengthways and scoop out the seeds. Discard, roast or compost them. Chop the squash into 1cm cubes. Peel and crush or finely chop the garlic. Peel the red onion and thinly slice it. Pick the thyme leaves, discarding the woody stalks.
Pour 1 tbsp oil into a deep frying pan or wok and bring to a medium heat. Add the onion, squash, thyme and garlic. Sprinkle in a generous pinch of salt and pepper. Pop a lid on the pan and fry for 15 mins, stirring occasionally, till the squash is tender and caramelised.
While the squash is cooking, make your salad. Trim the ends off the courgettes and use a vegetable peeler to create ribbons. Discard the seeded middles. Pop in a large bowl and toss with the rocket. Squeeze half the lemon juice into a small bowl and pour in 1 tbsp oil. Add a little salt and pepper and whisk into a dressing. Set aside.
Fill a large pan with boiling water and sprinkle in a good pinch of salt. Return to the boil. Add the spaghetti to the water. Simmer for 8 mins, till the spaghetti is tender and not too soft.
While the spaghetti is cooking, Stir the cream into the butternut squash pan and fold in the spinach. Reduce the heat to low and cook for 2-3 mins, till the leaves are wilted.
Drain the spaghetti, reserving 1 mug of the cooking liquid. Add the spaghetti and liquid to the squash in the frying pan and use tongs to toss well for 1 min, till the creamy sauce has thickened and coats the pasta and everything is well combined. Squeeze the juice from the remaining lemon half into the pasta. Have a taste and add more salt if you think it needs it.
Divide the pasta on 2 warm plates. Toss the courgettes and rocket with the lemony dressing and serve on the side.