Attach interrupt query

You need to look into the State Change Detection example. You want to do something when the switch BECOMES pressed, not IS pressed. Or BECOMES released, not IS released.

Nothing in what you are doing appears to need interrupts.

I am new to the Ardunio programming, a total of 1 day experience.

Especially under these circumstances.

Learn about the Tools + Auto Format menu item. Your code looks like crap the way it is indented. There is no need for that.