I want void loop to go through once

How is your switch wired? You configured the pin as INPUT and the way you have it coded implies you have a pull-down resistor. Is that correct?

Assuming HIGH means the switch is activated then you need to look for a LOW to HIGH change and not the state of the input.