It’s a little hard to provide specifics based on the image in your post, but here’s a basic outline to manage invulnerability…
Create a variable to manage the vulnerability state:
onready var is_invulnerable = false
When you start your timer, set the variable indicating invulnerability:
$invulnerability.start()
is_invulnerable = true
Wire the timer’s timeout signal to a function, which will fire when the timer runs out. In that script, reset your variable so the player is no longer invulnerable:
_on_timer_timeout():
is_invulnerable = false
Finally, in your existing code, where the player takes damage, don’t do that as long as is_invulnerable == false. So, something like this: