This is why you have to trust stock apps more than other apps.
There are stock file managers that comes with your phone, stick with them, they are more trusty and reliable, same as stock PDF readers.
If its a must to try out another app make sure it's a popular one and go through their official website, let the website lead you to the right apk on playstore, gone are the days where it's safe to search for apps yourself.
Anything app ads related must be ignored, normally ads popping up on your phone is spamming for me, you shouldn't allow this, anyways let's just be careful because this days apps steals information on phones and send through cloud to the operator.