You want a video quieter while your music stays where it is. macOS has one output volume shared by every app, so the volume keys move everything together. There are three ways around it.
Spotify, Music, Zoom, Discord and the YouTube player each have a volume slider inside the app. Turn one of them down and the others stay as they are.
The catch: every app keeps its slider in a different place, and some have none. Safari, for example, has no volume control of its own: only the player inside the web page does.
When a tab plays sound, Safari shows a speaker icon on that tab and in the address field. Click it to mute that tab. That works for silencing an autoplaying video, but it is only on or off: you cannot make the tab half as loud.
A mixer app gives every app that plays sound its own slider, in one place. calmdoo lives in the menu bar: click the speaker icon and each playing app has a row. Drag Safari to 40%, leave Spotify at 100%, mute Chrome. calmdoo remembers each app's setting for next time.
Other mixers exist, some with features calmdoo does not have, like sending apps to different speakers. See volume apps for Mac compared.
A slider for every app that plays sound, boost up to 400% with a limiter, and an EQ and compressor per app. Open source, no driver, no account. macOS 15 or later.
Get calmdoo