What changes?
Inner padding separates content from its container; outer spacing separates containers. Related contents usually need a tighter relationship than neighboring groups.
Use it in your work
Keep a card heading close to its paragraph, with more space before the next card.
A common mistake
Using larger gaps within a group than between groups.
Context matters
Equal padding on every side is a starting point, not an optical guarantee.