Does the type of ore used for building the Beacon pyramid matter?

No, all blocks used to build the pyramid have the same effect. The way you activate different powers is through the Beacon Block's GUI. Placing a single iron ingot, gold ingot, diamond, or emerald will allow you to set which power is being produced by the pyramid. The size of the pyramid determines the radius of the effect, and the number of powers which can be active at the same time. To change to another power, another of those four items must be used.

Source


The type of block used for the base has no impact on how the beacon works. If you're placing the beacon permanently, your only concerns are availability and aesthetics (maybe in case your beacon is at risk of explosions you may go with insanely expensive Netherite beacon base and make it blast-proof).

If you're building a temporary pyramid to e.g. dig up an area, your best choice is gold blocks, as they are mined considerably faster than the remaining options (0.6s vs 0.95s to mine by unenchanted diamond pick without Haste) which helps when removing the beacon. (also, start mining a Haste beacon from the bottom to retain the Haste I effect for nearly entire work)