Boil the pasta: Bring a large pot of well-salted water to a boil and cook the pasta according to the package directions until al dente. Before you drain it, scoop out about 1 1/2 cups of the starchy pasta water and set it aside.
Whisk the ricotta sauce: While the pasta cooks, whisk the ricotta, parmesan, lemon zest, lemon juice, olive oil, grated garlic, salt, and pepper together in a large bowl until smooth.
Loosen it with pasta water: Whisk in about 1/2 cup of the hot pasta water, a little at a time, until the sauce is silky and pourable. The heat takes the raw edge off the garlic and helps the ricotta smooth out.
Toss the pasta in: Add the hot drained pasta to the bowl and toss hard with tongs for a full minute. Keep adding pasta water a splash at a time until the sauce turns glossy and coats every noodle instead of clumping.
Finish and serve: Taste and adjust the salt and lemon. Top with fresh basil, extra parmesan, and red pepper flakes if you like a little heat, and serve right away while it's warm and creamy.
Notes
Whisk the ricotta sauce with hot, starchy pasta water first, then toss hard with the hot pasta to emulsify it into a silky coating. Use whole-milk ricotta for the smoothest, creamiest sauce.