Yes at a basic level, there are two; AF motor in camera, and AF motor in lens.
AF and AF-D lenses are both mechanical, AF motor in the camera.
Right or wrong, AF and AF-D are how the lenses are identified.
We will disagree on AF-S vs. AF-P.
Yes both use an AF motor in the lens, but the AF motor is different, AF-S = Silent Wave vs. AF-P = Pulse/Stepper, that Nikon has them identified different. And that also affect compatibility. If your camera is not fully compatible with AF-P, you cannot even manually focus the lens, as it is "focus by wire."