You  can activate or inactive the nearest point mode by pressing the "F6" key on the keyboard  .

When creating primitive object combinations, if you activate the nearest point mode, you can easily connect objects to each other.