Bra size is based on the size of the breast, while flange size is based on the size of the nipple.
To determine your flange size, most experts recommend that you measure the diameter of your nipple (not including your areola). Make sure to perform this measurement on both sides in case you need two different flanges. Select a flange that is 3-4mm larger than your nipple diameter. Note that your nipple swells while pumping, and since the rate of swelling varies between women, it’s important to take this into account when considering your size.
For example, if your nipple measures at 21mm, you would want to try the 24mm flange.
Why does this matter?
If your flange is too small your nipple may rub on the sides. If your flange is too large your areola may be pulled into the tunnel along with your nipple. If your flange is the wrong size you may not completely empty and still feel "full" after pumping.
When your breast pump flange size is correct, your nipple is centered and moves freely in and out of the tunnel. It should mimic baby more like a gentle suck/tug, NOT be painful or cut off blood flow in any way.
Finally, note that over the course of breastfeeding, your flange size may change.