Cook the Pasta: Boil ziti in salted water until al dente. Drain and set aside.
Prepare the Sauce: Heat olive oil in a pan over medium heat. Sauté onions until translucent, then add garlic and cook for 1 minute. Add ground sausage or beef, cook until browned, then drain excess fat. Stir in crushed tomatoes, tomato sauce, oregano, basil, red pepper flakes, salt, and pepper. Simmer for 15 minutes.
Prepare the Cheese Mixture: In a bowl, mix ricotta cheese, egg, and 50g Parmesan cheese until well combined.
Assemble the Dish: Preheat oven to 190°C. In a greased baking dish, layer half of the cooked ziti, half of the sauce, and half of the ricotta mixture. Repeat the layers, then top with shredded mozzarella and remaining Parmesan.
Bake: Cover with foil and bake for 25 minutes. Remove foil and bake for another 10 minutes until cheese is bubbly and golden brown.
Rest & Serve: Let the baked ziti rest for 10 minutes before serving. Garnish with fresh parsley and enjoy!