Controllig car led's with pwm

As pointed out, using analogWrite() you can only get 256 different values, at least if you are using an AVR processor. Using other processors, such as an ESP32 would allow you to use more steps

Which Arduino board are you using ?