Being a little less forthright than the above ( because I don't want to get banned ! LOL) you have to understand that in being sold such a device you have been sold a pup (Boom! Boom ! ).He's a baby, in human terms, but a lot easier than a baby because babies don't think in terms of always wanting to please their adults, parents. He does.
He likes a cuddle and he likes a soft encouraging voice.He doesn't understand 'right' and 'wrong' in human terms,only 'approved of' and 'not approved of'. He knows the former from the approving voice and praise [wags tail,acts happy] and the latter from being stopped the instant he tries it and the disapproving voice that goes with that. [looks puzzled and tries again but gets the same response, so eventually gives up, if only because he prefers the other reaction!]
Toilet training is a bit different, because at first he's too young, not mentally developed, to know there's a place to excrete and be able to stop himself anyway. But any good book will tell you how to teach that. There's umpteen sound methods, none of them are instant ( and none of them involve punishment or sprays or corrective devices like yours !)