Controlling light experiment failed

Bulb is not stop glowing after 2-3 click on / off

Hey
Kindly share some some details like code snippet and image of hardware connections to understand the issue even better.