display only youtube video sticky post

When you call get_the_content() some filters aren’t applied like they would with the_content() so if you want your content to be formatted you have to use the following:
$my_content = apply_filters( 'the_content', get_the_content() )

If you want to extract the youtube video out of your content you’ll have to detect the youtube link with a regex and then apply the filter on the extracted url.

https://codex.wordpress.org/Function_Reference/get_the_content

error code: 523