When a menu bar helper or a sync agent hangs, quitting it in Activity Monitor feels like a guess: will it come back on its own or not? If the thing runs as a launchd agent, launchctl can restart it properly.
The subcommand is kickstart. With -k it kills the running instance first and then starts the service again; -p prints the PID of the new process. The target is written as a domain plus the job’s label. For agents in your own login session that domain is gui/ followed by your user ID:
launchctl kickstart -kp gui/$(id -u)/com.example.agent
Swap com.example.agent for the label of the job. You’ll find it as the file name of the plist in ~/Library/LaunchAgents (minus .plist), or in the Label column of launchctl list. Without -k, kickstart only starts a job that is not running and leaves a running one alone, which I’d use when I’m not sure.
Daemons that run for the whole machine sit in the system/ domain instead. Anyone may read that domain, but changes need root, so those take sudo:
sudo launchctl kickstart -k system/com.example.daemon
The caveat: a kickstart restarts the process, it does not read an edited plist again. If you changed the plist itself, use launchctl bootout and launchctl bootstrap, which the man page describes as the new forms of unload and load. And I’d keep this to my own agents and third-party ones. Killing Apple’s own services just to see what happens is a good way to spend an afternoon rebooting.
Further reading: launchctl man page (ss64)