Unless I missed something, it looks like the load current still is 20 mA. In that case, there is a real possibility that the static current to run a switching regulator is greater than the load current. Plus, there still is power loss in the switching element, magnetics, etc. Per the datasheet, the worst case no-load input power is over twice as much as the LEDs being driven. This is a good indicator of how efficient the part is at very low load currents.
Consider a *linear* <gasp> regulator.
Delivering 6 V / 20 mA from a 24 V source, the power dissipation in the regulator is only 0.36 W. Yes, that also is greater than the load power, but I think there are several advantages to going a.n.a.l.o.g.
First, lets address the instant assumption that a linear regulator is inefficient. In this application, so what? Or, more accurately, yes but not enough to matter and not as much as you think. A 7806 in a TO-220 package would get warm to the touch, but not require any heatsink. It needs small input and output capacitors, but so does that switching part, so that's a wash. And don't let the "switching" buzzword fool you. It also will get warm. That part is 96% efficient only at full load current with one particular input voltage. As above, in this application the "96% efficient" part is dissipating more power than the load. Two switching regulators is a lot of grief go through for less than 1/8th W.
Speaking of EMI, check out the recommended EMI filter for that little switching puppy. If that is what they put on the datasheet, it is a clear indication of how noisy the part is. And to be clear for the less experienced, the linear regulator has no EMI.
The linear regulator type is a much more common part number - better availability and price. Way better. Like 8:1 better.
https://www.digikey.co.uk/en/products/detail/onsemi/MC7805ACTG/1481210
But wait - there's more. Now that it has been determined that current limiting is needed, let's change the linear regulator to a 7812, followed by a 300 ohm, 1/4 W resistor. Total regulator power dissipation is shared between two devices for lower operating temperature - chip power is less than 1/4 W and resistor power is less than 1/8 W.
And finally - constant current. Analog with a great big capital A.
Using the same combination of one regulator chip and one resistor, you can configure a 7805 or 7812 into a constant current regulator. The LM317 is famous for this application, but the larger the regulator headroom, the less heat is pushed into the resistor. With the number of LEDs you have now, a 7812 would have approx. the same power distribution as above.
This will deliver 20 mA to the LEDs even if the number of LEDs doubles (with a 7812) or triples (with a 7805). A nice advantage of this solution is that the static current in the regulator chip is delivered to the load rather than to GND. This does not reduce the heat in the component, but it gets double duty out of the current causing that heat. AND - if you stick with the two-regulator configuration, the unused regulator is drawing zero power, because if it is not driving a load, there is no static current. Now *that* is efficient.
ak
ps. I also recommend Ron's single-regulator system configuration in post #3. It eliminates the need for Shottkey diodes, costs a lot less, and is just plain less work.