@vanielynm Unfortunately, currently there is no SharePoint out of the box way to hide file name from SharePoint file and media web part.
This web part does not have any settings/options to do that. If you want Microsoft to provide such option in future, you can submit feedback/idea on SharePoint Feedback Portal .
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.