Нow to call a function only once, during the game, and not when loading the scene?

Godot Version

4.2.2

Question

Hello! I made a function where I add 1 to a variable that shows the value of objects and then through Animation Player display the value on the screen, this function should be called once when the player opens a chest (goes to Area2d and presses a certain button) when I called this function in the process, it logically began to be executed many times. how to call a function so that it is called only once, and not through a Ready

Should all be covered in the docs: