Android 8.0 and above handles this per-app. When you try to open the downloaded APK, the system will ask: "Allow your browser to install unknown apps?" Tap Settings, then switch on Allow from this source, and go back to continue.
On Android 7.0, the setting is global: Settings › Security › Unknown Sources Toggle it on. You can turn it off again after the install is complete.