Wash and dry the pumpkin. Then cut a piece and remove the fibers and seeds. Peel it (place the piece on a cutting board and peel with a knife) and cut into approximately 1-2 cm pieces of similar size.
Transfer the pumpkin pieces to a baking sheet lined with parchment paper (leave small spaces between each piece). Place in an oven preheated to 180°C and bake until soft, about 10-15 minutes. Meanwhile, prepare the remaining ingredients.
Cook the pasta (check the recipe).
Peel and finely chop the onion. Heat the olive oil in a pan. After a moment, add the onion. Sauté for a few minutes, stirring occasionally.
Transfer the slightly cooled pumpkin and onion to a blender. Season with salt and pepper. Blend until smooth and uniform. If necessary, add a little water while blending.
Combine the drained pasta with the pumpkin mixture. Mix well, ensuring the pasta is fully coated with the puree.
Transfer to a plate.