How to secure the default elastic username and password in elasticsearch.yml, logstash.yml and kibana.yml files?

I'd just remove them from elasticsearch.yml file.

For Kibana: Secure settings | Kibana Guide [8.11] | Elastic

For Logstash: Secrets keystore for secure settings | Logstash Reference [8.11] | Elastic