Preheat your oven to 375°F (190°C).
In a large pot, bring salted water to a boil. Add the cubed potatoes and cook until tender, about 15-20 minutes. Drain and return to the pot.
While the potatoes are cooking, heat olive oil in a large oven-safe skillet over medium heat. Season the cod fillets with salt and pepper, then add them to the skillet. Cook for about 3-4 minutes on each side until golden brown. Remove the cod and set aside.
In the same skillet, add minced garlic and cook for 1 minute until fragrant. Pour in the heavy cream, add rosemary, and lemon juice. Stir to combine and let simmer for 2-3 minutes.
Return the cod fillets to the skillet, spooning some of the sauce over the top. Transfer the skillet to the preheated oven and bake for 10-12 minutes, or until the cod is cooked through and flakes easily with a fork.
While the cod is baking, mash the cooked potatoes with milk and butter until smooth. Season with salt and pepper to taste.
Serve the cod hot, drizzled with the creamy sauce, alongside a generous scoop of garlic mashed potatoes.