This is a complex problem. The way I usually deal with it is to use a state machine. The idea is that your zombie can be in one of several different states, and as different things happen, they will change to a different state and behave differently.
You can make a simple state machine by making an enum for your different states and keeping track of it in your node:
class_name Zombie
extends Node3D
enum States { IDLE, FOLLOW_PATH, REACT_TO_HIT, DYING, DEAD }
var current_state:States = States.IDLE
Here the zombie starts IDLE, which means just standing around. Every _process() call you can check the current_state to figure out what to do. The state can change based on game events - eg, if the zomibe takes a hit, it will change to the REACT_TO_HIT state. If the hp is equal to zero, after reacting to the hit is done, it will switch to the DYING state.
There are lots of useful online articles that go into more depth about state machines.
This is a tough problem. Don’t feel too bad if you’re finding it tricky.
Edit: To identify your zombie character, the best way I’ve found to do it in Godot is create a special node that has useful info like that in it. For example:
class_name EnemyInfo
extends Node
enum EnemyType { ZOMBIE, WEREWOLF, GHOST }
@export var enemy_type:EnemyType
You can create one of these nodes that lists the enemy type (and other info you might find useful) and add it as a child to your player body. Then when you need to check if your character is a zombie or something else, just look through all the children of the node and see if any of the child nodes are of the EnemyInfo type. If there is one, you can then get the enemy_type from it.