I don't recommend applying state-machine approach for everything, this often results in incredibly entangled code. Instead of checking variables on every tick and using "trigger once" condition, it's much easier to create a function. Call the function from the event where the state changes (for example when the target is selected). This way you can be certain that it will be executed once only. You can add console logging to see if and when the event is executed.
What is the correct way to use "Trigger Once"?
I can tell you where you shouldn't use it - inside of loops, triggers, functions, and with objects that have multiple instances. It's often difficult to predict how it will work in these situations. For example, this code seems so convenient, but it will glitch if there is more than one enemy instance with HP=0
Enemy HP=0
Trigger once: Enemy play "death" animation