It is actually pretty easy. In my case I needed to reach from Laravel Sail to my local MongoDB Database.
All I needed to do is change DB_DSN in my .env file accordingly.
It was earlier:
What it needs to be:
You can find detailed information in Docker Docs under "I want to connect from a container to a service on the host" topic.
I hope it helps.