"G-sync compatible" is exactly the same thing as FreeSync, nVidia just doesn't want to use AMD's original name for it (which is the same reason Intel called their compatible 64-bit x86-64 instead of originator AMD's name of AMD64 for reasons that should be obvious). It's a software implementation that AMD got inserted as part of the Displayport 1.2a standard (first in GTX 10 series) and VESA's HDMI 2.1 standard (first in RTX 30 series).
FreeSync of course worked on AMD cards as far back as HDMI 1.2a and GCN 2.0 but was a proprietary add-on protocol back then (like Super G or 108G) requiring both an AMD certified card and monitor. Lots of proprietary protocols like TurboQAM eventually became standardized, although the final 56k v.90/v.92 was not the same as either the earlier X2 or K56Flex protocols so early adopters beware.
The original G-sync requires a proprietary hardware module in the monitor, which nVidia was very interested in selling to monitor manufacturers. It's still around, as is G-Sync Ultimate, the HDR version.