If you only have this functions in your script, it’s just never get called.
In GDscript, when your scripts extend a Node derived class, it inherits some functions, such as _ready(), _process() or _physics_process(). See Node — Godot Engine (stable) documentation in English for more information.
If you want your function to be called as often as possible, call it under _process() :