Preheat and prep: Heat the oven to 400°F (200°C). Pat the cod dry with paper towels and set aside. Dry fish browns better and won’t water down the sauce.
Make the base: In a baking dish, combine tomatoes, olives, red onion, garlic, capers (if using), lemon zest, 2 tablespoons olive oil, oregano, red pepper flakes, and a pinch of salt and pepper.
Add the white wine or broth if using. Toss to coat and spread in an even layer.
Season the cod: Drizzle the fillets with the remaining 1 tablespoon olive oil. Season both sides with salt and pepper.
Place the fish on top of the tomato mixture.
Add lemon: Squeeze half the lemon over the fish and the tomato mixture. Slice the remaining half into thin rounds and tuck a few slices around the fillets.
Bake: Bake uncovered for 12–15 minutes, depending on thickness. Cod is done when it flakes easily with a fork and reaches an internal temperature of 145°F (63°C).
Finish: Sprinkle with chopped parsley.
Taste the pan juices and adjust with more lemon juice, salt, or pepper if needed.
Serve: Spoon the tomatoes and olives over the fish. Serve with crusty bread, couscous, rice, or roasted potatoes to soak up the sauce.