Find distractions and if you’re comfortable, social support. Stay in a public place around so masturbation is less accessible, and try to do things that actively engage your mind instead of allowing it to wander into unwanted territory. Study something new, read a book (that doesn’t have any sexual themes), or work on some sort of tactile project that requires a lot of focus. If you consume a lot of erotic material, use website blockers to make it harder to access