The correct choice of a BB is determined by both the frame (i.e. BB shell spec) and the chainset.
Unless your frame is
Italian, quite old (over 20 years and/or French etc.), or falls into the latest
oversized shell categories some manufacturers are adopting, most BB shells on the road are English thread of 68mm or 73mm wide. You need to establish that first.
Once that is established, you need to find out what your chainset requires. The chainset will determine the type (JIS or ISO square tapered, octalink I, octalink II, ISIS, Hollowtech, etc. etc.), and specific spindle length for a certain chainline (driven e.g. by whether the chainset is primarily designed for a track, road or mtb bike, and whether it is a single, double or triple chainset). In some instances you might want and be able to use a spindle length that is somewhat different to that recommended by the chainset manufacturer to meet your specific chainline requirement. However, shortening the spindle length could, depending on the frame and the chainset's q factor, cause a clash, and using a different square tapered spindle length spec could cause asymmetry at the pedals, since most such spindles are asymmetric, and by differing amount.
There is no secret afaik, just complicated.