5V bus and 12V bus from 40-58V battery
Before you decide whether any strategy is "best", you have to define how better is measured.  Is the criterion cost, size, efficiency, long term availability of parts, has the right color, or something else?

For a reasonable electrical design tradeoff, you start with defining the maximum current each supply must be able to source, and what part of that must happen concurrently.

If the 5 V supply only needs to source a small fraction of the 12 V power, then it's probably better to deal with the high and variable voltage once to make 12 V, then make 5 V from there.

If the 5 V current requirement is really low, like only running a small microcontroller, then just a linear regulator might be good enough to go from 12 V to 5 V.  For example, if the maximum 5 V current is 60 mA, then a linear regulator would only dissipate 420 mW.  A 7805 in TO-220 package sticking up in free air can handle that in many circumstances.  You can put a resistor on the input of the 7805 that drops its input down to 7.5 V at maximum current.  Then the 7805 only dissipates 150 mW, and the resistor does the remaining 270 mW.

If the 5 V supply has to source more power, then use a buck regulator from 12 V to 5 V.  If the 5 V supply must source a "large" amount of power relative to the 12 supply, then a separate buck from the battery may make more sense, especially if efficiency is important.

There are lots of options.  Again, you have to start with real specs, then define how "best" is to be measured.