A current-limiting resistor is used to prevent excessive current from flowing through a component or circuit. Itβs essential in protecting sensitive components, such as LEDs, from damage caused by too much current. By adding a resistor in series with the component, you can control the amount of current that flows through it, ensuring it operates within its safe limits. The resistor's value is chosen based on the desired current and the voltage applied to the circuit.