This is a better solution. There are two solutions: isolated and non-isolated. I recommend the isolated solution because of security.
Use a current transformer to collect the current in the loop, and then convert the current output by the current transformer to a voltage through a resistor, and then simply use a diode to rectify.
If you need precision, use the RMS chip directly.
At this time, you get a Voltage signal, this voltage signal can be compared with the reference voltage through a comparator, and then the output of the comparator is connected to a BJT or NMOS to drive the buzzer