So just to make sure I've understood, you were trying to use a particular third-party app (such as a file explorer) to install an apk, accidentally denied it that permission, and now you can't use it to install apps.
So when you say it won't let you change the permission, do you mean that it no longer asks (just says it can't do it), or have you gone into the system settings to change it and found you can't? Samsung tend to mess with the menus, but on my Pixel I would go to Settings, Apps, select the app, Advanced, Install Unknown Apps, and that allows me to toggle the setting for those apps with this capability.
If it really won't let you change it that way then you could work around it by using a different app. Personally I only allow one of my file explorers this permission, and even then I turn it off after use (it does give me the option of turning it on next time). But from looking at my apps it seems that all of my file explorers, one of my email clients and all of my browsers can potentially do this, so it shouldn't be hard to find a different app if you can't fix this. I have to say though that I'd never allow an email client to do this, and under no circumstances a browser: with the number of dodgy ad servers that try to download apks, and websites that pay little attention to the ads they are hosting, it seems reckless beyond belief to actually let a browser install an apk as well as download one!