How to disable Internet Sharing on a Mac

This should work for all recent versions of macOS, although the System Preferences window may look slightly different to the one shown here.
  1. Open System Preferences
  2. Choose Sharing.
  3. Unlock the padlock.
  4. Deselect Internet Sharing as in this picture:
  5. Click the padlock.
  6. Close the System Preferences window.