Preheat the oven to 325°F. Generously grease and flour a 10-inch Bundt pan or a 9x5-inch loaf pan, making sure to coat all corners and curves well.
In a medium bowl, whisk together the all-purpose flour, baking powder, salt, cinnamon, and nutmeg until evenly combined. Set the dry mixture aside.
In a large mixing bowl, beat the softened butter and granulated sugar with an electric mixer on medium speed for 3 to 5 minutes, until the mixture looks pale and fluffy.
Add the eggs one at a time, beating well after each addition. Mix in the 2 teaspoons vanilla extract, then beat in the mashed sweet potato until the mixture is smooth and evenly colored.
Add the dry ingredients to the butter mixture in three additions, alternating with the 1/2 cup whole milk in two additions. Begin and end with the dry ingredients, mixing on low speed just until combined after each addition. Scrape the bowl as needed and avoid overmixing.
Transfer the batter to the prepared pan and smooth the top. Tap the pan gently on the counter a few times to release large air bubbles.
Bake for 70 to 75 minutes, or until a skewer inserted into the center comes out clean or with a few moist crumbs. If the top browns too quickly near the end, loosely tent with foil.
Cool the cake in the pan for 15 minutes, then carefully turn it out onto a wire rack to cool completely for about 20 minutes more.
To make the glaze, whisk together the powdered sugar, 2 tablespoons whole milk, and 1/2 teaspoon vanilla extract in a small bowl until smooth and pourable.
Drizzle the glaze over the slightly warm or cooled cake, letting it run down the sides. Let the glaze set for about 5 minutes before slicing and serving.