Heat olive oil in a large skillet over medium heat. Add minced garlic and sauté until fragrant but not browned (about 1-2 minutes).
Stir in diced tomatoes, oregano, red pepper flakes (if using), salt, and pepper. Bring to a gentle simmer for about 10 minutes.
Gently nestle cod fillets into the sauce, ensuring they are partially submerged. Cover the skillet and cook for 8-10 minutes until the fish is opaque and flakes easily.