Preheat the oven to 375°F (190°C).
Cook the ziti pasta in a large pot of salted boiling water according to package instructions until al dente. Drain and set aside.
In the same pot, cook the ground beef or Italian sausage over medium heat until browned. Drain excess fat.
Stir in the marinara sauce, Italian seasoning, garlic powder, salt, and pepper to the meat mixture, simmer for about 5 minutes.
In a mixing bowl, combine the ricotta cheese, egg, and half of the grated Parmesan cheese. Mix well and season with a little salt and pepper.
In the baking dish, spread half of the meat sauce on the bottom, then layer half of the cooked ziti on top.
Add dollops of the ricotta mixture over the ziti, followed by one cup of shredded mozzarella.
Repeat the layers – the remaining meat sauce, the rest of the ziti, and the remaining ricotta mixture. Top with the leftover mozzarella and remaining Parmesan cheese.
Cover the baking dish tightly with aluminum foil and bake in the preheated oven for 25 minutes.
Remove the foil and bake for an additional 15-20 minutes until the cheese is bubbly and golden.
Remove from the oven and let it cool for a few minutes before garnishing with fresh basil or parsley. Serve warm.