Cook the pasta: Bring a large pot of salted water to a boil. Add spaghetti and cook until al dente according to package instructions. Before draining, scoop out about 80 ml of pasta water and set aside. Drain the pasta.
Prepare the ricotta sauce: In a large mixing bowl, whisk together ricotta cheese, grated Parmesan, olive oil, minced garlic, lemon zest, and lemon juice until smooth and creamy.
Combine pasta and sauce: Add the hot pasta directly to the bowl with the ricotta sauce. Pour in a little reserved pasta water and toss well, adding more water as needed until the sauce is silky and coats the pasta evenly.
Season and serve: Taste and adjust with salt and black pepper. Garnish with fresh basil leaves and a sprinkle of lemon zest. Serve immediately.