A fair amount of measuring goes into getting a good fit. Online fit guides can teach you how to take your own measurements, which often include width, pupillary distance (PD), arm length, bridge width, and lens width. Often, the best place to start is to measure a pair of glasses you already own and that fits you well. They may still have the lens, bridge, and arm length printed on the inside of the arm too.
Taking measurements like pupillary distance is a bit trickier. If you’ve just had an eye exam, they can tell you your pupillary distance. Some brick and mortar eyeglass stores will take the measurement for you for free. Otherwise, you might have to get fancy and use a mirror to measure from the middle of one pupil to the middle of the other.