Hi @Ioana_Catalina_E - welcome to the forums!
You can find the details around the MongoDB server hostname in the connection string your application uses to connect to the database (See this docs page for details - https://docs.mongodb.com/manual/reference/connection-string/).
You can then use nslookup or a similar tool to determine what the IP of the server is based on it’s hostname.
Hope this helps and if you want to try out this commands, you can always use Atlas’s Free Tier to create a cluster and then test these commands mentioned to see how it works before checking your other server.
Kindest regards,
Eoin