Like Eis said above, i typically start at my goal generally being 1-3 T3 constellations and look at what affinities I want to reach and at what levels, then take any constellations that are must-haves or required like RR, Kraken for 2-handed or ones for survival (life steal, health regen, damage absorption etc.) to start.
After that, I look at what other T2 or T1 procs I want for supplementary damage or other utility, e.g. Fissure for Fire or Blizzard for Cold are givens as examples if I can fit them in though others like Scales or Bard’s Harp are/can be just as important if not more important on energy heavy builds and something I think about early on. These are further dependent on playstyles as pets for example want procs like Shepherd’s Crook for damage or might want constellations like Wolverine or Typhos or others for pet resistances amongst other things. Retaliation also has it’s own set of devotions that it exclusively picks.
Finally, I fill the rest in with what affinities I need paying attention to what stats they provide often through T1s though some T2s also have pretty juicy nodes like Harvestman’s Scythe, e.g. Jackal is great for total speed and some OA/physical resistance, Hawk/Spider/Raven are great for OA with speed on Spider and crit damage on Hawk as extras, Wolverine and Solemn Watcher are prime and easy spots for DA etc. I also try to be efficient with my picks not going over the affinity requirements unless necessary. If I happen to have remainder points, some constellations even incomplete have good nodes in the middle that can be grabbed like 3pt Wendigo for Physical resistance + attack/cast speed, right side of Obelisk for the massive DA, 3 point Oklaine’s Lantern is pretty nice as well etc… This is also where I start making tweaks as necessary if I cannot hit my goal and need to start reworking some of those T2 damage procs or rethink whether my end goal is doable with everything else I want to take. Or if I find I need more of a specific stat in my build, like do I need more OA? More DA? More speed or physical resistance? Do I need CC resistances like Slow/Stun perhaps?
It is also worth paying attention to affinity rewards throughout the process - certain ones like Viper are unique and make it easy to build up those affinities for say Ultos very easy and despite my rough thought process get taken early on for this reason. Lotus/Oklaine’s Lantern are others I consider for Rattosh as well early on for examples. There’s no easy way to learn which ones are best to pick or in what scenario except as tqFan said to study several end game builds and of course to go out and make and play your own to see for yourself what works and what doesn’t work.