Connecting client application to MariaDB Galera cluster
You'll have to look up on the documentation of your database connector. Normally (e.g. in Java world) you can specify comma-separated list of nodes instead of a single host.

For instance, check the documentation on Failover at:
https://dev.mysql.com/doc/connector-python/en/connector-python-connectargs.html

Alternatively you can run a separate load-balancer server "in front of" the cluster nodes and just point the client to the load-balancer.