You gotta realize they are just thoughts and urges that YOU are experiencing. The YOU that experiences them is not the thought. Now if you give the urge your body you’re not being the one in control, the urge is in control. That’s kinda how I see it.
I know exactly what you’re talking about though. For one thing our brains work without us asking them to sometimes. What causes the issue, in my opinion, is our dread, disgust, shame, self hatred of those thoughts. It’s like with panic attacks. You worry youre going to have one. The thought comes of having one. You obsess over having one. Then you start to gave one and those thoughts amplify and multiply, spinning out of control in a sort of thought loop or cycle.
You see a young girl. With the ways they dress now it’s already setting up a sexual response for some guys. The issue is you are obsessed with the fact that you have those thoughts. Of course they bother you but it’s your reaction to them that matters. The more you panic or react to them, the more they will come.
The thing is these thoughts are not you. You are the observer of your thoughts. You can look at them as s third party so to speak. I’m not talking about urges here, just thoughts. Urges are different to me, but thoughts are usually before urgres. They precede them if that makes sense.
For me, if the thought comes I notice it and let it pass. If it comes again I let it pass. Think of them as third parties. As passers by. They may bug you but they can’t force you to do anything. It’s just brain activity. The less you fear them the less they come in my experience. We are trained to focus on danger and fear. This is good when fear is a lion or a cliff edge. It’s over active when we don’t have those same struggles anymore (lions and such.)
Try to observe the thoughts as an outside viewer next time. Like a scientist observing a specimen. It’s not you. It’s a thought. YOU are the one observing. Realize this. You’re getting caught in unpleasant thought loops. You see a young girl and automatically go into this mode. But it’s just a thought loop. You aren’t are horrible person.