You’ll generally find that the player is “muted” and will be muted until the user interacts with the page (due to the magical black box of browsers + auto play non muted video content, and the related “site interaction score”).
So I’d guess the problem is the video is muted and you did set the volume.
Mute and volume setting are two different things in the player JS API. And a call to unmute may also be blocked by the browser until the users interact. So when the user manually unmutes the player then the select volume should apply