If you want to know more, here's some good places to start in the systemd docs:
General hardening: https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#Sandboxing
Network filtering: https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html
+ honourable mention for SSH, a tool I haven't used but looks interesting, which can automatically generate hardening settings for you by observing what your service actually does at runtime: https://github.com/desbma/shh