Cook the pasta:
Preheat the oven to 375°F (190°C). Cook the ziti pasta according to package directions until al dente. Drain the pasta and set it aside.
Cook the ground beef:
In a large skillet, heat 1 tbsp of olive oil over medium heat. Add the chopped onion and cook for 3–4 minutes, or until softened. Add the minced garlic and cook for another 1 minute.
Brown the beef:
Add the ground beef to the skillet, breaking it apart with a wooden spoon. Cook until browned and fully cooked through, about 5–7 minutes. Drain any excess fat.
Make the sauce:
Stir in the marinara sauce, crushed tomatoes, dried basil, oregano, and red pepper flakes (if using). Season with salt and pepper to taste. Simmer the sauce on low for 10 minutes, allowing the flavors to combine.
Prepare the ricotta mixture:
In a separate bowl, combine the ricotta cheese, 1 cup of mozzarella cheese, and ½ cup of Parmesan cheese. Season with a pinch of salt and pepper.
Assemble the baked ziti:
In a large mixing bowl, combine the cooked pasta with the beef and tomato sauce mixture. Stir to combine.
Layer the ziti:
In a greased 9x13-inch baking dish, spread half of the pasta mixture on the bottom. Spoon dollops of the ricotta mixture over the pasta. Top with the remaining pasta mixture. Sprinkle the remaining mozzarella and Parmesan cheese over the top.
Bake:
Cover the baking dish with aluminum foil and bake for 20 minutes. After 20 minutes, remove the foil and bake for an additional 10–15 minutes, or until the cheese is golden and bubbly.
Serve:
Garnish with chopped fresh basil or parsley, if desired. Serve hot and enjoy!