Power Regulation 12/24V to 12V, 5V, 3V3
You could use a linear supply, but wasting 36W means a sizeable heatsink. You don’t mention environmental factors like size and operational temperature range.
You could use a buck to get 12V from 24V and use a relay to bypass the buck if the input voltage is less than, say 13V.
Another option is to use a dc/dc converter with a suitable input range and 12V output.
Like most engineering decisions, list down your criteria and apply values to them. Eg cost: 1..2$ 1000 off. Size, weight, temperature range, allowable heat rise, input range, output tolerance and so on.