How do I know the resistance of a logic level MOSFET transistor?
If your MCU is driving the base of a BJT transistor, a safe value of a resistor is 5K-10K. This limits any in/ out current to below 1 mA and still drives the BJT into saturation easily.

In the case of a MOSFET, even if there is no gate current but gate charge, the same value helps limiting current peaks when switching.