Do not automatically assume the newest WCAG version is the legally mandated version everywhere.
The U.S. ADA Title II web rule references WCAG 2.1 Level AA. Current UK public-sector guidance refers to WCAG 2.2 AA. Section 508 incorporates WCAG 2.0 Level AA for many ICT requirements. Contracts may name their own target.
Practical rule
First, identify the applicable law, policy, procurement request or contract. Then choose the testing target. If no external requirement names a version, WCAG 2.2 AA is often a strong technical target for current web work, but that is a technical choice rather than a universal legal conclusion.