How can a Docker container reach a service that’s only listening on localhost of the host machine?

What is the portable, recommended way to let a container reach a service that’s listening on the host machine’s localhost?

host.docker.internal domain in Docker Desktop or