A microcontroller pin provides a control signal, not a general power output. Always check the limits in the board and microcontroller datasheets. A motor, relay, solenoid or LED strip usually needs a switching component: often a bipolar transistor (BJT) or a MOSFET.
Both can use a small control signal to switch a larger load, but the right choice depends on the load, drive, topology, switching frequency and cooling.
The bipolar transistor: size the base current correctly
An NPN transistor such as the BC547BTA is driven with base current. Size the base resistor for the required collector current and saturation while staying within the driving output's limit. Do not rely on a typical current gain (hFE) alone.
A BJT can be practical for small loads and simple circuits. Account for base current, collector-emitter voltage in conduction and the resulting power dissipation.

The MOSFET: check the actual gate voltage
A MOSFET is driven by voltage on the gate. The gate draws virtually no steady-state current, but it must still be charged and discharged while switching. Gate charge, switching frequency, gate resistance, a pull-down and a possible driver therefore affect reliability and efficiency.
The IRLZ44NPBF is a 55 V N-channel MOSFET. Infineon specifies a maximum RDS(on) of 22 mΩ at 10 V gate drive and 35 mΩ at 4.5 V. The datasheet does not guarantee RDS(on) at 3.3 V. The words logic level alone therefore do not prove that a MOSFET is fully driven at your gate voltage.
A headline current rating is not a ready-to-use project current. Check voltage, normal current, inrush or stall current, safe operating area (SOA), pulse duration, duty cycle, temperature, PCB and wiring, mounting and cooling.
The VGS(th) trap
VGS(th), the gate-threshold voltage, only marks the start of conduction. It is not the voltage at which the MOSFET is fully on. Base your choice on guaranteed RDS(on) at the gate voltage actually available.
Check the actual circuit
- Determine load voltage, normal current, inrush or stall current and whether the load is inductive.
- Choose the topology. An N-channel MOSFET or NPN transistor used as a low-side switch is not the same as high-side or galvanically isolated switching.
- For a BJT, size base current and resistance for saturation. For a MOSFET, check RDS(on) at the real gate voltage.
- Check heat and SOA at the relevant voltage, temperature, pulse duration, duty cycle, mounting and cooling.
- Define a reliable off-state with a gate-source pull-down where appropriate and decide whether a gate resistor or driver is required.
- Protect an inductive load with a diode or clamp network selected for current, reverse voltage, stored energy, switching frequency and recovery. The 1N4007G is a 1 A standard-recovery diode, not a universal PWM solution.
- Verify pinout, common ground or required isolation, and behaviour when one supply is off before connecting the circuit.
Summary
A BJT often suits small, simple loads; a MOSFET can be advantageous for efficient switching, higher currents or PWM. Do not choose from one current rating, VGS(th) or the label logic level; check the guaranteed datasheet values for your complete circuit.