Gen4 21 magazines will work in any generation 21 or 21SF.
Gen3 21 magazines will work in any Gen1-3 21 or 21SF.
Gen3 21 magazines will work in the Gen4 21 if you keep the magazine release on the left side of the frame.
Just keep in mind that the SF frame is only smaller front to back, that is the reach to the trigger is less than a regular frame Glock. Therefore, all mags made for the regular frame guns will fit the SF frame guns.