What type of device are you using?
When you go into settings, search for install unknown apps, then you will have to disable it by app.
This is turned off by default. Previously to Android Oreo, there was a single setting to enable/disable this option. Since Android Oreo, this is an application specific setting.
To enable this for an app, go to Settings -> Apps -> 3 dot menu -> Special access -> Install unknown apps. There you can select the app that you want to use to download an app from an unknown location.