For typical city water, sediment/carbon usually goes before the softener. For wells with iron or sulfur, dedicated oxidation/filtration often belongs before the softener so the resin is protected.
Typical city-water sequence
A common sequence is sediment → carbon or catalytic carbon → softener → optional drinking-water RO. This keeps larger particles and disinfectants from reaching downstream equipment.
Well water with iron or sulfur
High iron, manganese or sulfur can foul softener resin. Dedicated oxidation and filtration usually belongs upstream when those contaminants are present at meaningful levels.
Where UV belongs
UV is normally placed near the end of the treatment train after sediment and chemical issues have been addressed. Clear water helps UV disinfection perform as intended.
Do not design the train without testing
A treatment order built from symptoms alone can waste money. Test hardness, iron, manganese, sulfur indicators, pH and microbiological risk before assembling equipment.