As stated above the hFE varies widely, from part to part, even of the same batch and changes with the operating conditions such as: current, collector-emitter voltage and temperature. It should not be relied upon.
A BJT has three operating regions.
Cut-off. no base current is supplied and the collector current is tiny, theoretically zero, but there will be some leakage.
Active. The collector current varies, depending on the base-emitter voltage and current. Increasing the base current, results in a proportionate rise in collector current, depending on the hFE. For example, if a part has an hFE of 500, when VCE = 10V, then when IC = 10mA, IB = IC/hFE = 10mA/500 = 0.02mA. If the base current is increased, the collector current will increase by the same factor, so setting IB to 0.04mA, will result in a collector current of 20mA.
Saturation. Beyond a certain point, increasing the base current further, no longer results in an increase in collector current, which is now mostly set by the collector load resistance. The transistor will still stop a small voltage, known as the saturation voltage. To achieve this, the base current needs to be much higher, than that in the active region.
In reality, there's some crossover between one operating region and the next, as the hFE varies. When in cut-off there should be no current, apart from a small leakage, which increases, as the base-emitter junction is forward biased. The hFE is low, at tiny currents, but increases rapidly, in the active region. Past a certain point, the hFE falls, especially as the collector-emitter voltage drops below, the base-emitter voltage, when the collector-base diode junction starts diverting some of the base current to the collector.
In short. You ideally want the transistor to be in the saturation region, when it's turned on. Unfortunately to get a really low, saturation voltage, a lot of base drive is required. IB = IC/10 is often specified on data sheets, but in reality, you can often get away with much less, in many applications. Your relay is run off 24V, so a voltage drop of 1V wouldn't be a big deal, which is why I suggested the BC337, because its hFE is specified when VCE = 1V.