On port 9200/TCP Elasticsearch serves its REST API over HTTP(S); OpenSearch uses the same port. Communication between cluster nodes runs separately on port 9300. Binding is controlled by network.host in elasticsearch.yml; by default it is reachable locally only.
Do not expose it without protection. Anyone who can reach the API can read, change and delete indices. From Elasticsearch 8 on, TLS and authentication are enabled by default; older installations can run without a login. Better: restrict access to app servers with a firewall, or put a reverse proxy with authentication in front and stay internal.
Typical: curl on port 9200 fails with "SSL certificate problem" or 401 – from version 8 HTTPS with a user is required. The CA certificate is then at config/certs/http_ca.crt and is passed with --cacert.
Check
curl --cacert http_ca.crt -u elastic https://es.example.com:9200/_cluster/health?pretty