It’s not to just stop, I know, that’s entirely the problem! If you can’t do that after repeated attempts my other tip is, don’t get there. Don’t try to get right to the edge, stick to ‘soft edges’ where you can’t cum by accident. Enough to feel good, to make you feel horny, but not close enough to lose all self control and go over and then get pissed off with yourself.
Beyond that, if you know you can edge but not cum from various techniques, e.g. fingers only, vaginal or even anal only, then get near the edge normally and switch yourself over to these techniques so you just can’t cum.
Let us know how that works for you.