Dice the onion, carrots, and celery into small, even pieces. Mince the garlic, cube the potatoes (keep in cold water), and pat the cod dry and cut into 1 1/2-inch chunks. Season cod with 1/2 teaspoon salt and 1/4 teaspoon pepper and refrigerate. Chop parsley and juice the lemon.
Heat olive oil in a Dutch oven over medium heat. Add the onion, carrots, and celery and cook for 6 to 8 minutes, stirring often, until soft and translucent—do not let them brown.
Push the vegetables to the sides, add the garlic to the center, then stir in the tomato paste, thyme, smoked paprika, and red pepper flakes. Cook for 1 to 2 minutes, stirring constantly, until fragrant and the paste darkens slightly.
Pour in the white wine and scrape the bottom of the pot to loosen browned bits. Simmer for about 2 minutes, until reduced by half and the sharp alcohol smell fades.
Add the diced tomatoes with juices, fish stock, drained potatoes, and bay leaves. Bring to a boil, then reduce heat to medium-low, partially cover, and simmer for 15 to 20 minutes until the potatoes are fork-tender. Stir in the remaining salt and pepper.
Lower the heat so the broth barely bubbles. Nestle the seasoned cod into the broth in a single layer, pressing under the liquid. Cover and cook for 5 to 7 minutes, until the fish is opaque, flakes easily, and reaches 145°F. Stir gently or not at all.
Remove from heat and fish out the bay leaves. Stir in the chopped parsley and fresh lemon juice. Taste and add a pinch more salt if needed. Ladle into warm bowls, ensuring each serving gets plenty of fish, potatoes, and broth.