Help selecting a NPN transistor
If you drive a relay (with a flyback diode) you basically need to look at two parameters (or analogous for MOSFETs):


Continuous collector current (this must be larger than your relay coil current)
Maximum collector-emitter voltage (this must be larger than your supply voltage to the relay)


If the first one is not met, then the current will burn out the transistor. If the second one is not met then the transistor will be blown by excessive voltage.

After some years in the business you will just have your favourite parts (in this case my would be: IRLZ44N, BUZ11). If you need to drive many relays: ULN2003, ULN2803 (watch out not to exceed the max total current).

If you are buying from a small shop, then go into the right category, sort by price and keep going through datasheets until you find one that is good enough (and has some headroom).

If you are buying from a large distributor, then filter by the required parameters.