Is there a difference between "macros" and "programmable buttons", or are they the same thing?
It changes. (May or may not mean the same thing)
Macros are usually meant on adding scripts to regular keys, for example if the game doesn't use the P key, you can add a macro to it using various software like AutoHotkey. Some hardware manufacturers might mean Programmable Keys while talking about these too, so searching what they exactly mean before purchasing might be a good idea.
Programmable Keys usually mean extra keys in the keyboard, for example G1-G6 keys in some Logitech Keyboards or M1-M5 in some Razer Keyboards:
Image copyright gaming.logitech.com
Image copyright windowscentral.com
These buttons can usually be configured too, but with custom tools such as Logitech Gaming Tool or Razer Synapse. The difference of this from regular macros are that these keys aren't used by any software (or games), so you can add functions without worrying about blocking a key in the software.