How to stop urges when you're in the moment?

Does anyone have their own methods for stopping urges to watch porn when you’re already having them? For masturbation too. If anyone has anything that might be helpful please, feel free to share.

change the place where you are.
Often urges are bond to a certain place (shower, bed, office)
e.g go out for a walk


Thank you bro! I’ll try it