Hi linusandnik,
You should be able to get the functions keys back to performing volume control by making sure the keyboard function keys hasn't been changed.
Go to How to use the function keys on your Mac - Apple Support to view more details about the function keys. Looking at the steps below, follow the steps, but you want to make sure this feature below isn't enabled. If you see the check in box, remove it and test F11 and F12 again.
Change the default function key behavior
If you want to change the top row of keys to work as standard function keys without holding the Fn key, follow these steps:
1. Choose Apple menu > System Preferences.
2. Click Keyboard.
3. Select "Use F1, F2, etc. keys as standard function keys".
This making sure this isn't enabled may help get the keys working as expected again.
Take care!