Prep all your ingredients: dice the onion, mince the garlic, and chop the basil.
Season each cod fillet generously with salt and pepper.
Heat olive oil in a pan over medium heat until shimmering.
Sear the cod in the pan for 3-4 minutes per side until golden brown, then set aside.
In the same pan, add more olive oil if needed, sauté the onion until translucent, then add the garlic and cook until fragrant.
Add the diced tomatoes and let them soften, then stir in the chopped basil.
Return the seared cod to the pan, nestling it into the sauce, and let it simmer for 3-5 minutes.
Plate the cod, spooning sauce over the top, garnish with a lemon wedge, and serve with sautéed spinach and olives.