Preheat oven to 200°C (180°C fan).
Peel and chop the pumpkin into cubes, roughly chop the onion, and leave garlic cloves in their skins.
Place pumpkin, onion, and garlic in a bowl. Add olive oil and honey, stir to coat evenly, then spread onto a baking tray. Season with salt and pepper, scatter over thyme, and roast for 40 minutes, stirring once or twice, until tender and caramelised.
Once cool enough to handle, squeeze roasted garlic from its skins and discard thyme sprigs.
Transfer roasted vegetables to a saucepan. Deglaze the baking tray with stock, then pour into the pan. Blend with a stick blender until smooth, or use a jug blender for an even silkier texture.
Stir in cream if using, taste, and adjust seasoning.
Serve hot, garnished with cream, roasted pumpkin seeds or croutons, and a side of crusty bread and butter.