01 - Preheat the oven to 375°F. Grease a 9x13-inch baking dish.
02 - Bring a large pot of salted water to a boil. Cook pasta until just al dente. Drain and set aside.
03 - Heat olive oil in a large skillet over medium heat. Cook onion until translucent, about 3 minutes. Add garlic and cook for 1 minute.
04 - Add ground beef to skillet. Cook, breaking up meat, until browned and cooked through, 6–8 minutes. Drain excess fat.
05 - Stir in marinara sauce, Italian herbs, salt, black pepper, and red pepper flakes if using. Simmer for 5 minutes.
06 - In a large bowl, mix cooked pasta, half the meat sauce, ricotta, and 1 cup mozzarella gently.
07 - Pour half the pasta mixture into the baking dish. Top with half of the remaining sauce and half the Parmesan. Layer remaining pasta, then top with remaining sauce, mozzarella, and Parmesan.
08 - Cover with foil and bake for 25 minutes. Remove foil and bake another 10–15 minutes until cheese is bubbly and golden.
09 - Let rest 10 minutes before serving. Garnish with fresh basil if desired.