https://www.discoverdigitalphotography.com/2012/lens-mounts-...
The "AF-D" lenses have contacts back to the camera body that communicate distance information (that is in turn used by the camera body to calculate flash power).
The G mount lenses remove the manual coupling for the f/stop which means that only bodies that can control the aperture from the body can use them. My FM3A has no aperture control on the body and so with that camera, I unlock the aperture ring.
The AF-S camera lenses have the focusing motor in the body.
VR in Nikon is done in lens. https://kenrockwell.com/nikon/80400vr.htm It needs to - you can't jiggle the film around to keep it in the same place.
---
The impressive part of Nikon's compatibility isn't only the "you can use an AI-S lens on a modern (professional) body, but also "you can use any of the F mount lenses on an old body" (the G lenses don't have the f/stop ring and the E lenses have the focus motor in the lens).
While it appears that Nikon has mostly shifted to E and G mount, third party lenses are still being manufactured for the F mount.
https://www.bhphotovideo.com/c/product/1519140-REG/tokina_at... - and you can see all the parts of the F mount, manual aperture ring control, 5 pins for distance, '-' slotted screw for focus.