Duckdns only works on wifi

I am trying to get remote acess to home assistant using DuckDNS. I can use my duckdns domain to access homeassistant when im on my local network but when Im on cellular data it doesn’t work. I tried configuring http and also using nginx. In both cases the duckdns url only works when I am connected to my local network.

Edit: It worked on wifi because My router had nat loopback. I found out my isp blocks ports 80 and 443 but I tried using other ports and had no success.
Edit2: Not sure what was happening but after resetting router it now woks by using Nginx and redirecting external 8123 to internal 443.