In a small mixing bowl, whisk the flour, baking powder, cinnamon, and nutmeg, if using, together. Set aside.
3¼ cups all-purpose flour, 2 teaspoons baking powder, 1 teaspoon ground cinnamon, ½ teaspoon ground nutmeg
In the bowl of a stand mixer fitted with the paddle attachment, beat the sugar and eggs on medium-high speed until smooth and pale yellow, about 2-3 minutes.
⅔ cup granulated sugar, 2 large eggs
Add the melted butter and buttermilk and mix just until combined, about 30 seconds.
4 tablespoons unsalted butter, ⅔ cup buttermilk
Switch to the dough hook attachment and add the dry ingredients to the bowl. Mix on low speed until a smooth dough forms, about 2-3 minutes. If the dough seems too dry, add more buttermilk gradually until it reaches the desired texture.
Place the dough in a lightly greased bowl and place it in the fridge to chill for at least 1 hour.
After the dough has chilled, heat 3-4 inches of vegetable oil into a large Dutch oven and bring its temperature up to 375°F.
Vegetable oil
While bringing up the oil temperature, roll out the dough to ½-inch thickness on a well-floured surface.
Using a floured donut cutter, cut out the doughnuts. Score the top of the doughnuts with a sharp knife.
Carefully place a few doughnuts at a time into the oil and fry until golden brown, about 2 minutes per side. Make sure not to crowd the oil too much.
Carefully remove the doughnuts from the oil and place them on a paper towel to remove excess oil, then transfer them to a wire rack to cool slightly.