Systemd's service options are quite lax by default, and so it is often desirable to look at ways to harden systemd services. page
A good way to get started on a given service is to look at the output of the command systemd-analyze security myService. From there, you can look at the documentation for the options you see in the output, often in man systemd.exec or man systemd.resource-control, and set the appropriate options for your service.