The 50 1.8G has the full-time manual focus override feature which means you can manually focus while in A/M Autofocus mode.
The 18-140 VR also has the full-time manual focus override feature even though it ony has A and M on the switch.
Some lenses have a more basic type of autofocus and must be switched to Manual mode before manually focusing.