Preheat the oven to 400°F (200°C). Pat the cod dry with paper towels and season both sides with salt and pepper.
Heat olive oil in an oven-safe skillet over medium heat. Add the onion and sauté until translucent, about 5 minutes.
Add garlic and grated ginger and cook for 30 to 60 seconds until fragrant.
Pour in the coconut milk and stir. Bring the mixture to a gentle simmer and let it reduce slightly for 3 to 4 minutes.
Stir in lemon juice and lemon zest. Taste the sauce and adjust salt and pepper if needed.
Nestle the cod fillets into the sauce skin side down. Spoon some sauce over the fish.
Transfer the skillet to the oven and bake for 10 to 12 minutes. Check at 10 minutes. Fish should flake easily with a fork.
Remove from oven and let the dish rest for 2 minutes. Spoon extra sauce over each fillet and garnish with lemon zest or fresh herbs. Serve immediately.
Notes
Use an oven-safe nonstick skillet for best results. Full-fat coconut milk is recommended for creaminess.