For me you look at the head, guesstimate the size and try the socket/ spanner for a good fit.
You can tell before you apply any torque if it's likely to round or not.
I could probably pull 4 or 5 M6x1 metric fasteners out of my tool box with 4 different heads (10mm across flats, 5mm Allen...