The simplest systems are sensors that short or open based on pressure, temperature, voltage level, fluid level or some other condition, causing the circuit to the buzzer to complete. The sensors can fail, wires to/from them can short or become loose, etc. More complicated systems feed the sensor's output to a circuit board, provide some logic, and decide what noise to make or what light to light when the sensor indicates an out-of-tolerance condition. Most of the logic circuits will fail eventually in the challenging marine environment, and how they fail is variable. Intermittent, unrepeatable alerts are the hardest to determine the source and fix and may indicate an impending major or minor problem. Keep watching for gauge changes when the alarm sounds.
Not sure what else you can do without knowing what the buzzer means. Is it the same buzzer that sounds when the key is turned on before engine start? (low voltage?, low oil pressure?) Is there something in a manual that can help? If it's an operational alarm (engine/drive oil pressure, coolant temperature, a fluid level, etc.) you should have gauges to give some confidence that all is okay or that might indicate a problem.