Preheat your oven to 350°F (175°C) and grease a 9-inch round cake pan.
In a medium-sized mixing bowl, whisk together the flour, sugar, baking powder, baking soda, cinnamon, and salt until well combined. Set aside.
In a separate large mixing bowl, cream together the softened butter and eggs until light and fluffy. This will take around 2-3 minutes.
Gradually add the dry ingredient mixture to the butter and eggs, alternating with the buttermilk. Begin and end with the dry ingredients, mixing well after each addition.
Stir in the vanilla extract until fully incorporated.
Gently fold in the diced Granny Smith apples and chopped walnuts (if using) into the batter.
Pour the batter into the prepared cake pan, ensuring it is evenly distributed.
Bake for approximately 45-50 minutes, or until a toothpick inserted into the center comes out clean.
Remove the cake from the oven and let it cool in the pan for 10 minutes before transferring it to a wire rack to cool completely.