Data in Arduino UNO's EEPROM changes after 3-4 days randomly

Also

Unless you use an external pullup or pulldown resistor on pin 3, your pin 3 is initially a floating input that might have set the interrupt flag. At the moment that you use attachInterrupt after that, it will trigger the interrupt.

Your code shows pin 3 ?

And lastly, it's still not full code :wink: