How to add static route using dynamic public IP

Hi, Everyone

I want to add static route using dynamic public IP, the domain name is fix, but the server public IP change everyday.
How can I setup?
I'm new guy for this, please help me or give me some guide!
Thank you very much!

I suppose you have some remote server with dynamic IP which has some network behind it and you want to add a static route for that network?

Are you talking about IPv4?
Does the target network use private IP addresses, for example from the RFC1918 ranges?

Sorry, I can't connect world internet from my local ISP.
So I can't reply you quick.
Yes, remote server is dynamic ip and it change everyday.
I use domain name to connect it and get virtual local ip every time.
So how can to set it as default route with my Gateway?

And how do you connect to the remote server? OpenVPN, Wireguard or some other way?
Which device is OpenWrt and which version does it run?

You can only configure a gateway (or default route) on your local network, you cannot configure a gateway on a remoter server that is only accessible over the internet and through another gateway.

Perhaps you need a VPN?