There are certain abilities that require you to first make a hit, then you can choose whether or not to use that ability.
Starting at 5th level, you can interfere with the flow of ki in an opponent’s body. When you hit another creature with a melee weapon attack, you can spend 1 ki point to attempt a stunning strike. The target must succeed on a Constitution saving throw or be stunned until the end of your next turn.
Starting at 2nd level, when you hit a creature with a melee weapon attack, you can expend one spell slot to deal radiant damage to the target, in addition to the weapon’s damage. The extra damage is 2d8 for a 1st-level spell slot, plus 1d8 for each spell level higher than 1st, to a maximum of 5d8. The damage increases by 1d8 if the target is an undead or a fiend, to a maximum of 6d8.
Neither of these abilities specify whether or not you can declare these abilities before or after resolving damage. There are other abilities that say "after you know the roll, but before the DM tells you whether it was a success" or similar wording, but that usually relates to the d20 roll, not damage rolls.
Am I able to roll to attack, hit, roll damage, then make the decision as to whether to spend resources on an ability like Stunning Strike or Divine Smite? If I am allowed to do so after rolling damage, what about before or after the DM tells me the effects of the damage (e.g. did it kill the enemy or not)? Intuitively, it feels to me as though the answer is before damage only, but I'm not seeing anything that implies that this is the case RAW.
If this is something that isn't specified and is up to the DM, then so be it, but I'm specifically interested to know if there's any general rule anywhere that resolves this RAW, or whether I'm just not reading those abilities quoted above correctly (or whether there's another, similar ability that does make it a bit more explicit, and I just chose poor examples).