Baking powder puffs (rises) and baking soda spreads. Cut out cookies shouldn’t spread, they should just rise or your cutout will look fat. It is about the acid.
Baking soda needs an acid like buttermilk, lemon juice, vinegar, or sour cream to begin reacting, releasing gas bubbles, and rising.
Baking powder is actually baking soda mixed with just the right balance of another acidic ingredient, so you don’t have to worry about acid in your recipe or leftover soda in your batter. You can actually make your own baking powder. For one teaspoon of baking powder, combine 1/2 teaspoon cream of tartar, 1/4 teaspoon baking soda, and 1/4 teaspoon cornstarch. (The cornstarch absorbs any moisture and prevents reaction from happening too early in the process, so don’t skip it.)
You can substitute baking soda for baking powder if you increase the amount of acidic ingredients in the recipe to offset the baking soda. You’ll also need much less baking soda as it is 3 times as powerful as baking powder. You’ll need about a teaspoon of vinegar or lemon juice for every 1/2 teaspoon of baking soda.
Sometimes both leavening agents are used.
Baking powder needs first a liquid and heat (from the oven) to react and begin releasing gases. You may see this described as “double-acting” baking powder.