<a href="{{ file_url(node.field_document.entity.field_media_document.entity.uri.value) }}">
{{ node.field_document.entity.field_media_document.entity.filename.value }}
</a>
Of course you'll need to replace the fieldnames with yours.
The file_url
function is necessary to transform the URL into a workable public URL scheme, otherwise you'll get the URL prefixed with Drupal's public files directory.