Preheat your oven to 350°F (175°C). Grease and flour a 9x5-inch loaf pan or line it with parchment paper for easy removal.
In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, and salt. Set aside.
In a large mixing bowl, combine the granulated sugar, brown sugar, and vegetable oil. Mix until well combined. Add the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
Gradually add the dry ingredient mixture to the wet ingredients, mixing until just combined. Do not overmix.
Fold in the grated carrots and chopped walnuts until evenly distributed throughout the batter.
Pour the batter into the prepared loaf pan and smooth the top with a spatula. Bake in the preheated oven for 50-60 minutes, or until a toothpick inserted into the center comes out clean. If the top is browning too quickly, you can cover it loosely with aluminum foil.
Once baked, remove the loaf from the oven and let it cool in the pan for about 10 minutes. Then, transfer it to a wire rack to cool completely.
In a medium bowl, beat the softened cream cheese and butter together until smooth and creamy. Gradually add the powdered sugar and mix until well combined. Stir in the vanilla extract. If the frosting is too thick, add milk one tablespoon at a time until you reach your desired consistency.
