Hello janorato,
Thanks for using Apple Support Communities, it's great to have you here.
Do you have any sort of Bluetooth device connected to your computer that may be adjusting the volume without you realizing it? This could be a speaker or a Bluetooth headset. If you're not sure, you can try disabling Bluetooth entirely and testing the issue. You could also try disconnecting any peripherals from your computer to see if still happens.
To turn off Bluetooth:
1. On your Mac, choose Apple menu > System Settings, then click Bluetooth in the sidebar. (You may need to scroll down.)
2. Click to turn Bluetooth on or off.
3. If you’re using an external USB Bluetooth adapter, the option may not appear in Bluetooth settings. Try unplugging the adapter to turn off Bluetooth.
If that doesn't help, try booting your Mac into safe mode and see if the issue occurs there. Here's how: Start up your Mac in safe mode - Apple Support. The reason for this is because booting into safe mode will disable certain features and startup items, which can help isolate the issue. Once you've tested, reboot your computer normally to exit safe mode and test it again. Sometimes this can resolve it in and of itself.
Thank you for being a part of the community here. We hope this information helps!
Best wishes.