It is a TLS related bug in ElasticSearch <v8.18.0.
There are two options to fix or around this issue, first one is downgrade and stick the Python version to Python 3.13 (released in October 2024), second one is upgrade your ElasticSearch to v8.18.0 or newer.