ISO 22000:2018 10.1: Nonconformity and corrective action
When a nonconformity arises the organization responds: it acts to contain and correct it and deals with what follows from it, as applicable; it judges whether action is needed to remove the causes so the problem does not happen again or somewhere else, by examining the nonconformity, working out its causes and checking whether similar ones exist or might arise; it carries out whatever action is needed; it checks whether the corrective action worked; and it changes the system where necessary. Corrective actions match the effects of the nonconformities. Documented information is kept on what the nonconformities were, the actions taken and the outcome of corrective action.
This control maps to 35 controls across 22 other frameworks. If you already hold one of them, the evidence you collected for it is the starting point here rather than new work.