For example, fireball does 8d6 damage, and half as much on a successful dex save. Does half as much mean you take half as much as the total amount on the 8d6s, or do you only roll 4d6 instead? This is for DnD 5e.
Roll 8d6, then halve
Damage for spells targeting multiple creatures is always rolled just once. You roll 8d6, and apply the full amount to creatures that failed their save, and half of that to creatures that succeeded their save.
The more dice are being rolled, the more the result resembles a normal distribution. Halving the damage after the roll keeps the curve mostly intact, while halving the amount of dice would make the outcome less biased towards the mean (thus becoming swingier).