Bring a large pot of salted water to a boil and cook pasta according to package instructions.
Reserve 1/2 cup of pasta water, then drain the pasta.
In a large pan, heat olive oil or butter over medium heat.
Add garlic and cook for 30 seconds until fragrant.
Stir in the frozen peas and cook for 2–3 minutes until tender.
Add the cooked pasta to the pan and toss to combine.
Pour in a little reserved pasta water if the pasta seems dry.
Remove from heat, add Parmesan if using, and season with salt and pepper.
Serve warm.