Hi tonkin_tl00,
Welcome to Apple Support Communities. Based on your description with videos from the YouTube website not producing sound in your Safari app, there are a few troubleshooting steps that could help. It will depend on which device you are using.
First, start with clearing the Safari browsing history and cookies from your devices:
Clear your browsing history in Safari on Mac
Clear the history and cookies from Safari on your iPhone, iPad, or iPod touch
Next, confirm the sound issue is specific with the YouTube website on Safari, and not any other website on Safari or other app on your device:
If you can’t hear sound from your Mac speakers
If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker
Have a good day.