I am running Windows 10.
I downloaded in July ’21, the latest version of Opera, which was Opera Stable 77.0.4054.256.
I was unable to get any sound from YouTube videos, though I could if I used other browsers.
In Opera go into Opera ‘Settings’
In the search box type ‘sound’ (without the speech marks)
The word ‘sound’ will be highlighted where it appears in Settings’
On my machine, the word ‘sound’ was highlighted twice under ‘Additional Content Settings’
In ‘Additional Content Settings’ click onto the small arrow on the right hand side.
You will see the option ‘Allow sites to play sound (recommended)’
On my machine, the default for this was switched to ‘off’.
I switched this option on and stone the blinking crows, it solved the problem.
I suspect this option default was set to ‘off’ from the beginning.
Maybe Opera themselves could enlighten us ?.......