Both! I always cringe when I use the term 'it depends', but that's the sports scientist in me.
Zone 1 - Zone 3 = Heart Rate.
Zones 1 to 3 are the only steady-state zones, which means your physiology can reach a relative balance of supply and demand. We can rely on heart rate to give us the best representation of our effort.
Zone 4 + = Pace
Zone 4 is the first zone where the anaerobic energy system plays a critical role in ATP production. ATP is the energy currency of the cell. It's used for muscular contractions.
The primary fuel for the anaerobic energy system is carbohydrate, which comes from either blood glucose or stored glycogen. These carbohydrate supplies are limited. A by-product of the anaerobic energy system is lactate and hydrogen ions (H+). The increase in H+ causes an increase in cellular acidity and can contribute to fatigue.
You can only exercise at such intensity for limited periods of time, and it is therefore not a steady-state intensity. Your heart rate will help guide your intensity, but it will not help you elicit the best investment return like pace will.
Generally speaking, zone 4 workouts are designed to target the pace of a 10km - half marathon. Using a pace related to a race distance can help runners stay motivated and push themselves through each interval.
Use one to reference the other. It's always good to see how your pace correlates to different heart rates. As you build fitness, you'll start to run faster at lower heart rates.