There are a few things to consider.
First of all you have to have a domain or use some free domain like duckdns.
If you have dynamic ip than you have to update your ip address to that domain with some daemon running in background.
Than there is a possibility that your isp provider is using some kind of nat and you are sharing dynamic ip with a lot of people.
Easy way around this is using cloudflare addon or container for remote access.
Or you can just use adguard to rewrite you ha ip to your domain name and use ssl just for local access.
And probably you will need a reverse proxy for that, at least I’m using it. its a bit overkill but I like it.