When a server name is use, what I have seen the use case is normally it is for web based or intranet client-server system which is accessible by web browser or desktop application and the IP of the server is set as static. All the computers connected to the same network can access the server.
If it is for development purpose, we can use a dynamic IP until the router reassign new IPs to all the connected devices through DHCP. Static IP may conflict when the order of assigning the IP changed. I only use mobile hotspot for development so my laptop, Android emulator or phone IP seldom change their IP. If changed occurred, it is easy to modify the IP in the app and IDE.
In case you want to use the app as production for long term, the client app may have problem to connect to the server if the server IP has changed and no longer same as the hardcoded IP in the mobile app.
As answered by other members, you can use no-ip or duckdns services. You get a fixed public IP which is tied to the server no matter the IP has changed dynamically.
If it is a long run production server, another way is host the server as public. If hosted on your own premise, there are some configurations to set such as port forwarding, firewall and IP or Mac Address whitelisting. You still need a static public IP. Normally I will better just get a shared hosting server with a register domain name.
This is what I know.