How to stop youtube from opening in safari?

In the Safari app on your Mac, choose Safari > Preferences, then click Websites. Click Auto-Play in the list on the left. Do any of the following: Choose settings for a website in the list: Select the website on the right, then choose the option you want for it.

Also, how do I stop Safari from opening YouTube app?