Encrypt HTTP client communications for Elasticsearch

Look at the image sharing the docs for version 8.13.

Now, I am using docker for my application. And the step-1 says to stop Elasticsearch and Kibana if they are running.

I used to execute the commands, using docker exec command but that works only if the container is running.

Where and how will I run these commands if I stop my container ?

Note: I am a windows user and application is running on docker.