Preheat oven 350 degrees. Grease and lightly floor a 9" round or square pan.
Whisk flour, baking powder, salt and cinnamon together in a medium bowl.
In a large bowl stir together sugar, vegetable oil, egg and milk. Add the dry ingredients and combine until just combined. Stir in shredded carrots.
With the now empty medium bowl (that they dry ingredients were in) add the brown sugar, flour, cinnamon, butter and walnuts (if using). Stir until combined.
Pour batter into the prepared pan. Spread evenly and then top with streusel. Bake in oven for 25-35 minutes, until a toothpick comes out clean from the center. Allow to cool completely in pan.
While cake is cooling beat butter and cream cheese together with hand mixer. Slowly add sugar until well combined. Add the vanilla and beat a little more. If you like thick frosting stop here, if you want more of a glaze add milk until you reach desired consistency (one tbsp at a time).
Ice cake (I used a sandwich bag to "drizzle" icing over cake) and enjoy!
Recipe by pretty plain janes at https://prettyplainjanes.com/2015/03/25/carrot-coffee-cake/