If you have a public IP (the router IP is the same with the IP you get online), no matter if it is static or not, things will be easy. Just configure port forwarding on your router. Then for static IP, use your IP:port to access the NAS. For dynamic IP, configure DDNS (assigns dynamic IP to your domain), and use domain:port to access.

A more safer way is to configure a VPN tunnel between the NAS and devices outside NAS’s local network. However, this only works if your ISP provides no NAT service or static NAT (meaning that you have a static IP).

If you don’t have a public IP, then you will need reverse proxy to help you expose your local network behind a NAT to the internet. For that, a VPS with public IP and reverse proxy tool (NGINX, FRP) is required. Thus, the drawback is evident. The communication between your device and NAS highly depends on internet quality, and hardware performance of your VPS.

Just save a spot for this topic right here. I will introduce methods above once I have time in the future.