When people say “oysters,” there are actually two classes of molluscs they think of: “true oysters” from the order Ostreidae and “pearl oysters” from the order Pteriidae (via New World Encyclopedia). While real oysters can make pearls, they’re generally not gem-quality, and pearl oysters tend to live deep in the ocean beyond fishing reach, according to food republic.
According to ThoughtCo, pearls are formed when an irritating substance, such as a grain of sand, becomes lodged in the shell of an oyster and irritates it. To protect itself, the oyster will secrete the same substance it uses to build its shell around the irritant, enveloping it and making it smooth. This substance is the hard, shiny, colorful material people call mother-of-pearl, and the coated irritants are the beads used to make jewelry.
Although other molluscs, including muscle and clams, are capable of producing pearls, most are small and have no commercial value. This is because pearls that are too small, dull, or misshapen are not considered useful for jewelry (via Pearl-Lang).
That doesn’t mean that lucky breaks don’t happen! In 2018, the New York Post reported that two people discovered pearls worth $200 to $400 in oysters served at New York restaurants three weeks apart. So while you can never say never, it’s important to keep in mind that your chances of finding even a tiny pearl in your dinner are around 1 in 10,000.