Step 1: Preheat your oven to 400°F (200°C). Use clean paper towels to pat the cod fillets completely dry on all sides.
Step 2: Rub the fillets evenly with 1 tablespoon of olive oil, 2 cloves of minced garlic, the dried Italian seasoning, and a generous pinch of salt and pepper. Set the seasoned fish aside.
Step 3: Place a large, oven-safe skillet over medium heat and add the remaining 1 tablespoon of olive oil. Sauté the diced yellow onion for 3 to 4 minutes until soft and translucent.
Step 4: Stir in the 3 cloves of minced garlic and the whole cherry tomatoes. Cook for about 3 minutes, stirring occasionally, until the tomato skins begin to blister and crack.
Step 5: Turn the heat down slightly and pour in the heavy cream and grated Parmesan cheese. Stir well and bring the mixture to a gentle simmer for 2 minutes.
Step 6: Add the chopped baby spinach to the pan and toss gently for about 1 minute until it just begins to wilt into the warm cream sauce.
Step 7: Carefully nestle the seasoned cod fillets into the skillet, resting them deep in the sauce. Spoon a few tablespoons of the warm sauce directly over the top of each fillet.
Step 8: Move the entire skillet into the preheated oven. Bake uncovered for 12 to 15 minutes. The fish is done when it reaches an internal temperature of 145°F (63°C) and flakes easily with a fork.
Step 9: Remove from the oven, garnish with fresh basil or red pepper flakes, and serve immediately alongside your choice of sides.