your database service is running locally, if you check services, you will see that 127.0.0.1 is bound to the port 3306, so the database is only accessible locally, by your application, and that's exactly what you want, you don't want to expose your DB to the internet, you only want it to be accessed by your application.
If you want to check your database, simply run
mysql -u <username> -p
And you will be prompted for that user's password, the ones you're using in the .env file, or if you have not made any changes or low privileged users, you can do
sudo mysql
Hopefully this make the idea clear, else, I am happy to answer your questions.