Core rule
Attack rolls
An attack roll decides whether an attack hits. The total must meet or exceed the target’s Armour Class.
Roll a d20 and add the applicable ability modifier, proficiency bonus, and other attack bonuses. The weapon or spell determines which ability applies.
Damage is calculated after the hit is decided. A larger attack-roll total does not itself deal more damage.