Particleboard and MDF swell when wet and never shrink back. The bottom edge of the box, the toe kick and the cabinet floor go first. Plywood tolerates a soaking far better, though veneer can delaminate and face frames loosen. Solid wood doors often come through fine, then warp as they dry.
Hidden damage is the bigger problem. Water wicks up the back of a base cabinet into the drywall and insulation behind it, and a cabinet that looks clean from the front can hide mold. If a cabinet ever sat in water, pull it and look behind it before you decide to keep it.
Signs a lower-level cabinet took water
A toe kick that's swollen or peeling away. A cabinet floor that's soft or stained. Drywall behind the box that's discolored, crumbly or musty. Hinges that won't hold an adjustment because the side panel has softened around the screws.
Buying a house that may have flooded
Read the disclosures for past water events, then look at the lowest cabinets in the house: the basement bar, the laundry, the lower-level bath. If the history is unclear and the boxes are particleboard, replacing them is often simpler than investigating them.