Bring a large pot of water to a boil and salt it generously.
Add the rigatoni and cook according to package directions until al dente, stirring occasionally.
Before draining, reserve one full cup of the pasta cooking water and set it aside.
Drain the pasta and keep it warm.
Place a large skillet over medium heat and add the olive oil.
Once the oil is warm, add the minced garlic and cook for about 30 seconds, stirring constantly, until fragrant.
Lower the heat slightly to prevent browning.
Add the ricotta cheese to the skillet and stir gently until warmed through and smooth.
Add the lemon zest, lemon juice, salt, and black pepper to the ricotta and stir until fully combined.
Add the drained pasta directly to the skillet with the sauce.
Pour in the reserved pasta water a little at a time, stirring gently between additions, until the sauce evenly coats the pasta.
Stop adding pasta water once the sauce is creamy and clinging, not watery.
Add red pepper flakes if using and stir gently to combine.
Taste and adjust seasoning if needed.
Remove the skillet from the heat.
Sprinkle with chopped parsley just before serving.
Serve warm.