Then you can look at what precedes you cutting. Do something else that helps your mood when you get that urge.
What is one thing that you get into and stabilises your mood consistently. Do that whenever you get the urge to cut. See a Dr or therapist. If you’re at school still, get a note to be allowed to do that thing whenever you get the urge to cut.
Longer term, you need to develop more positive strategies but for now you need a circuit breaker to stop you