More info needed. Do other programs fail to produce sound or is it just Youtube videos? Does sound cut out if you play some MP3s or play a game or a video file?

Are you using speakers or headphones? Can you swap them out for a different set and see if the problem continues?