Airlines can voluntarily ground their planes. Manufacturers can recommend it. Generally, only a government agency can
force it and they only do so in truly extreme circumstances (often requiring multiple serious incidents). More commonly in the US, a directive will be issued to airlines telling them to carry out some remedy (fix/replace a part, change a procedure, etc.) and a window of time in which to complete it. They don't speculatively ground entire air fleets every time there's a potential problem.
For example, in 1991 a Boeing 737-200 crashed in Colorado with the loss of all lives on board. In 1994 there was another crash of a 737, in Pennsylvania, again killing everyone on board. In both accidents the investigation pointed to unexpected movement of the rudder.
Several other cases were identified where pilots claimed the rudder was moving unexpectedly, but they were able to land safely.
The follow-up took several years of investigative work, and eventually identified a situation where a servo could jam and deflect the rudder.
Despite two severe crashes and many other suspected non-fatal incidents, that generation of 737s was not grounded; the remedy, once the cause had been determined, was an order from the FAA to replace the servos, with a timeline by which the replacement had to be completed.