Preheat your oven to 375°F (190°C). Boil ziti in salted water until al dente. Drain and set aside.
Heat olive oil in a large skillet over medium heat. Add ground beef and cook until browned, breaking it up as it cooks. Stir in garlic and sauté for 1 minute. Add marinara sauce, reduce heat, and simmer for 5–10 minutes. Season with salt and pepper.
In a bowl, mix ricotta cheese, egg, Italian seasoning, salt, and pepper until combined.
In a large baking dish, layer as follows:
Spread a thin layer of meat sauce on the bottom
Half of the cooked pasta
Half of the ricotta mixture
Half of the mozzarella
Repeat with remaining pasta, ricotta, and meat sauce
Top with the rest of the mozzarella and sprinkle Parmesan over everything
Cover the dish with foil and bake for 20 minutes. Remove foil and bake uncovered for an additional 10 minutes, or until bubbly and golden on top.
Let the baked ziti rest for 5–10 minutes before serving. Garnish with fresh parsley or basil if desired.