The simplest and most generic solution is to go into the settings app and to your apps settings.
Select the app you want to prevent from opening.
Towards the bottom you should see something like "open.by default."
Not sure exactly which version of android changed the options, but if you tap that it will either give the newer option of °in the app °in the browser
In the browser should keep the app from opening.
I find the new language is much less clear on what these do vs :
The older default links settings was to not allow app to open. Ask. Or allow.
You might also find a setting in the browser itself along similar lines of 'allow links to open out of browser' , 'keep links in browser','open link in app' etc.
Also, if you like, you can also allow other preferred apps to open those links Eg:
And for more info :