I believe that, by default, subscribers don’t have access to the media library. So the answer to your question might depend on what exactly was done to give them that access in your case. For example, if someone used a role editor plugin to enable the upload_files capability for the Subscriber role, the simplest solution would be to disable that capability again. Or, if another active plugin is making the menu visible, it might be difficult to hide the menu without deactivating that plugin or changing its settings.
In general, you can hide a menu item by setting the “Extra capability” field to a capability that most roles have but the Subscriber role doesn’t. For example, edit_posts would work to hide a menu from the default Subscriber role (but might not if the role’s capabilities have been modified). You’ll probably need to apply the same setting to the the top level “Media” menu and its submenu items.