In WordPress Dashboard -> Appearance >Widgets, drag and drop a text widget to the widget area and paste the code inside the widget (under Text, not Visual)
Save
Method 2:
Use the Plugin- YouTube Subscribe Bar. This plugin is supposed to automatically display the YouTube Subscribe bar below every YouTube video on the site. But it didn’t work on my YouTube video