This article explains what you need to do to allow your Android device to install apps from outside the Play Store via APK files. This works on Android 7 and later.
Before you can install an APK file through Chrome, Files by Google, a file manager, or another app, you'll need to give that app permission to do so. You can do this via a switch in the Settings app.
Open the Settings app and tap Apps or Apps & notifications.
Tap the three dots in the upper right corner. If you don't see that, go to the next step.