Take a longsword, for example. Does the attacker choose piercing or slashing before they make the attack roll, after the attack roll is made but before the damage roll, before they make the damage roll, or even as the last part of the attack, after all the numbers are said and done?
You don't choose
No weapon in the PHB weapon table gives more than one damage type.
Each weapon has one type associated with it, so you just use that type.