Sounce like your button is bouncing.
What you need is "Debounce" method.
2 options available, hardware, using a simple debounce circuit, software, a debounce code.
If you search debounce in the forum, you will find a few items, if you search debounce on the web, you will find months of reading and learning from simple options to some rather complex ones.
Your picture shows the objects might not be placed in the right order. You need to place them in their logical order otherwise the signal won't process correctly.
It processes the objects from left to right, top to bottom.