It's likely that it already had that default association set up out of the box. If you open up the system App Info screen for YouTube, you should see a section that says "Set as default", and when you open that, it shows you which URLs it hijacks under "Supported web addresses", but in that same screen there should be a "Go to supported URLs" option, where you can choose "In this app", "Ask every time", or "In other app".
I am running Android 10 so it's possible it looks different on Android 6.
My original claim (which DocG disputed) was that clicking on a YouTube link launches the app by default, without asking the user. "By default" implies that this can be changed.
I am running Android 10 so it's possible it looks different on Android 6.