wait [n ...]
Wait for the specified process and report its termination status. If N is not given, all currently active child processes are waited for, and the return code is zero. N may be a process ID or a job specification; if a job spec is given, all processes in the job's pipeline are waited for.
Reference: https://cgit.git.savannah.gnu.org/cgit/bash.git/plain/builtins/wait.def?h=bash-5.3