My rule is work your way in from the outside. Sources first. My priorities are:
1. speakers - source for your ears. The single largest improvement you can make to a system is to choose the best speakers for your ears, your room, your music and to match the rest of your gear.
2. Front end sources: Analog: cartridge, tonearm, phono stage, turntable (in that order, IMO). Digital: DAC, source (streamer, computer, device)
3. Preamp.
4. Amp
5. Everything else: cables and tweaks