Many security breaches—even high-profile ones—stem from simple oversight. There’s one spot in macOS that has long been particularly susceptible to such lapse: the Sharing pane of System Preferences. I
In it you can enable a wide variety of sharing services some of which 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. We also caution against leaving Printer Sharing and Internet Sharing on unnecessarily.