Yes, you can cook the leek in advance (up to step 4) and/or also pre-cook the pasta (or use leftover cooked pasta). The only step that I do not advise to cook ahead is the sauce (step 5) as reheating it would make this dish too dry.