How to connect multiple 0402 leds to an Arduino for a 1:87 model
Assuming your voltage regulator is generously dimensioned (check what current it can deliver), you drive the LEDs from the internal board supply plane (5V), not from the ports. You can place an octal buffer driver or individual BJT between the MCU and the LEDs. It just needs to be fast enough to handle the PWM frequency, which shouldn't be an issue.

(Other options if low on available pins are shift registers or a LED matrix circuit.)

In addition, individual series resistors from the supply voltage to get the desired current. LEDs are traditionally rated at 20mA but you likely don't need that high current unless they are low quality. Aim for &lt;5mA, depending on LED brightness. It will vary with LED color, as different colors give different forward voltages.

With 24 x 5mA you might very well be within the allowed maximum total current spec of the MCU - check the manual. In which case you could drive the pins from the ports and only need the resistors.