Using resistance to reduce voltage actually has automatic protection function. When the charging current is too large, the voltage drop across the resistor will further increase, reducing the output voltage and the increasing trend of the output current.
When you use the output of the voltage regulator, it is actually a constant voltage source. It is actually harmful to keep the output of 5V when the current is high.