Learn how to disable sharing services on your Mac if you are not using them.
Many security breaches—even high-profile ones—come from simple oversight. There’s one spot in macOS that has long been particularly susceptible to such lapse: the Sharing pane of System Preferences. In this preference pane, you can enable a wide variety of sharing services. Some of these could allow another user to access your Mac remotely. They all let you limit access to particular users, but passwords can be stolen, accounts can be compromised, and server software can have bugs. For safety’s sake, if you’re not actively using a sharing service, turn it off. The most important ones to disable when not in use are Screen Sharing, File Sharing, Remote Login, Remote Management, and Remote Apple Events. I also recommend turning off Printer Sharing and Internet Sharing.