Preheat Oven: Preheat oven to 350 °F and line bottom of a 9×5-inch loaf pan with parchment paper, then spray the parchment and sides of the pan with cooking spray.
Mix Dry Ingredients: In a medium bowl, whisk together 1 ¾ cups all-purpose flour, 1 teaspoon baking soda, ¾ teaspoon cinnamon, ¼ teaspoon ground nutmeg, and ½ teaspoon salt. Set aside.
Mix Wet Ingredients: In a large bowl, beat 1 ½ cups granulated sugar, ½ cup canola oil or vegetable oil, 2 large eggs, 1 cup cooked and mashed sweet potatoes, ⅓ cup whole milk, and 2 teaspoons vanilla extract with a hand mixer until smooth. (Make sure the sweet potatoes are fully cooled — warm potatoes can cook the eggs and affect loaf texture.)
Combine: Add dry ingredients to the wet mixture. Mix gently by hand just until no dry streaks remain. Do not overmix.
Bake: Pour batter into prepared pan and bake for 40-45 minutes. Check the loaf at this point — if it’s browning too quickly but the center isn’t set yet, loosely cover with foil. Continue baking until a toothpick inserted in the center comes out clean, about 55-60 minutes total.
Cool: Allow loaf to rest in pan for 10 minutes, then run a knife around edges and carefully transfer to a wire rack to cool completely.
Brown Butter: Add 1 stick unsalted butter (cut into pieces) to a skillet over medium heat. Melt and cook, watching carefully. Butter will foam, then turn amber and fragrant. Remove from heat immediately when amber-colored to prevent burning, and transfer to a heat-safe bowl. Allow browned butter to cool and solidify at room temperature.
Mix Frosting: In a bowl, combine cooled browned butter, 2 ounces cream cheese, 1 ½ cups powdered sugar, and ¼ teaspoon vanilla extract. Beat with a hand mixer for 2-3 minutes until fluffy and smooth. (If frosting is too soft, chill briefly; if too stiff, warm gently for easier spreading.)
Frost Loaf: Once bread is completely cool, frost generously, letting some frosting gently drip down the sides. Slice and serve.