When you host something on LAN only you are not exposing the service to the wider internet directly.
This means someone would need access to your LAN or local area network first (such as your WiFi password) before being able to reach said service.
Now when you expose something directly to the internet, in a way that for example it displays a publicly accessible webpage, it makes it easier for anyone to reach that webpage, and potentially figure out your login and password information through brute force. Or some other type of exploit that allows full bypass of the login credentials.
Some self-hoster's choose to keep their "more sensitive" services on the LAN only, and then use a VPN (that's hosted privately) to access their LAN remotely from anywhere in the world.
With a VPN hosted on your LAN it provides a good layer of security as someone would first need to have access to your VPN to then potentially try and get access into your services.