Schottky diode failure
Any ideas why the component failed?

The maximum repetitive peak forward current for the BAT54J is specified as 300 mA in the data sheet. Take note: -


Simple math about the converter
To achieve 3.3 volts on the output of the buck converter requires a duty cycle of about 0.1375 assuming the converter operated in CCM. In other words: -
$$\text{Duty} = \dfrac{3.3\text{ volts}}{24\text{ volts}} = 0.1375$$
If the load was 500 mA, the power out would be 1.65 watts and that power has to be passed through the diode from the 24 volt rail in 13.75% of the time.
So, the average current from the 24 volt rail is 1.65 watts ÷ 24 volts = 69 mA but, given that this average is delivered in only 13.75% of the time, the peak current would be: -
$$\dfrac{69 \text{ mA}}{0.1375} = 502\text{ mA}$$
And this exceeds to peak stated in the data sheet.
Just rough and ready calculations of course.
A proper estimation would need more information such as: -

The duty cycle of the buck converter because if it's working in DCM the current peak demanded by the converter may be several times that estimated if the duty is significantly smaller.
The ESR and ESL of the 10 uF capacitor (it could be a show-stopper). Cheap capacitors are not going to be cost effective in this part of the circuit and can vastly increase the diode current.
More information about the CM choke for instance, what self-resonant frequency it has and how closely coupled the windings are. This can also be a show-stopper.