Heat the oven. Preheat to 375°F (190°C).
Grease a 9x13-inch baking dish with butter or olive oil.
Boil the pasta. Salt a large pot of water generously. Cook the ziti until 1–2 minutes shy of al dente. Drain and set aside.
Build a quick sauce. In a large skillet, warm olive oil over medium heat.
Add garlic and cook 30–60 seconds until fragrant. Stir in marinara, oregano, and red pepper flakes. Simmer 5–7 minutes.
Season with salt and pepper.
Mix the ricotta. In a bowl, whisk ricotta, egg, milk, a pinch of salt, and a few grinds of pepper until smooth. This helps the ricotta stay creamy and spreadable.
Combine pasta and sauce. In a large bowl, toss the cooked ziti with about two-thirds of the sauce. The rest will be used for layering.
Layer the bake. Spread a thin layer of sauce in the baking dish.
Add half the sauced pasta. Dollop half the ricotta mixture evenly over the pasta. Sprinkle with one-third of the mozzarella and a little Parmesan.
Repeat. Add the remaining pasta, then the remaining ricotta in dollops.
Spoon on the last of the sauce. Top with the rest of the mozzarella and Parmesan.
Bake. Cover loosely with foil (tent it so it doesn’t stick to the cheese) and bake for 20 minutes. Remove foil and bake another 10–15 minutes, until bubbly and lightly browned on top.
Rest and serve. Let it rest for 10 minutes so the layers set.
Sprinkle with chopped basil or parsley. Slice and serve.