I’ll second what @Sir_Gwibbles says about IV. Every legendary caught has base IV of 10. Take Giratina-O, it has a base attack of 225, so a 10 attack IV has total attack of 235, 15 attack IV has attack of 240. So you’re talking about 2% variation between best and “worst”.
Apart from Heatran and the Kanto birds, which are re-released every 6-8 minutes, many legendaries will be a long time coming back around so don’t be afraid to power up the best of what you have.
@stativision is right about the Tier list too, it’s a good guide to build your teams and helps planning for the future too, which is half the battle in this game. Look for those types where non legendaries are as good (rock, grass, fighting spring to mind) as well as those legendary types with most utility.
If you don’t know what to power up first, try and look ahead. Sometimes you can’t but right now you know there’s about 3 months of the forces of nature, so look for common weaknesses across the three.
If you don’t instantly need sonething, there’s nothing wrong with waiting, it takes moments to power up, but a long time to replace the dust and RC invested into the wrong thing.
Lucky trades are a big help, if you have a local group, you can save loads of dust lucky trading.
Finally, I’d recommend powering up a couple of things to L30, rather than one to L40. Only when you’ve got a rounded set of teams for most types would I recommend going much above 30.
As always, it’s your game, your fun so if you want to throw away all of the above and power a shiny 66% Latias to L40 go for it.