01 - Bring a large pot of salted water to a boil. Cook the penne according to package directions until al dente. Reserve 1/2 cup of pasta cooking water, then drain.
02 - While pasta cooks, heat olive oil in a large skillet over medium heat. Add minced garlic and chopped onion; sauté for 2–3 minutes until softened and fragrant.
03 - Stir in crushed tomatoes, sugar, red pepper flakes (if using), salt, and black pepper. Simmer for 10–12 minutes, stirring occasionally to develop flavors.
04 - Add drained penne to the sauce and toss thoroughly. Add a splash of reserved pasta water if needed to achieve a silky, coating consistency.
05 - Gently fold in ricotta cheese, half the basil, and grated Parmesan. Cook for 1–2 minutes until everything is heated through and cheese is slightly melted.
06 - Divide among serving plates. Top with remaining basil leaves and additional grated Parmesan cheese.