If you have owned a Mac for a length of time you would have likely come across the “volume lock” issue, where the volume will “lock”, coming up with a cross symbol when you try and change it up or down. Fortunately this is pretty easy to resolve, however if it happens frequently there may be an underlying issue.
One way to fix the volume lock issue is to plug a set of headphones in then take them out again (or vice versa if the issue happens while headphones are in). The audio jack on modern Macs works with both analogue and digital connections, however the mechanical switch that changes between the two can get stuck, so this “volume lock issue occurs”.
If the issue persists after plugging and unplugging headphones, another step you can try is to kill off the “coreaudiod” process. This can be done by opening the “Terminal” application and typing “sudo killall coreaudiod” to terminate the process. Your Mac will automatically start it again, which could resolve the volume lock problem if it was a software issue caused by that process.
If after trying the two above steps your Mac’s volume is still locked, you will have to try restarting the computer. This should resolve the issue, however if it doesn’t there is a good chance that your Mac will have a hardware defect and will need to be repaired.