On this page of the Baldurs Gate 3 guide you will learn how to avoid dying.
Each member of your team has a certain amount of health points. During combat, each successful attack on a target takes away a specific amount of health points (some portion of them can be recovered through healing items and spells). When the value drops to zero, the character is knocked out and eliminated from the fight. At this point, a special icon will also appear above the hero, depicting his condition.
Roll against death
Running out of health points doesn't mean the hero is dead. You have a chance of reviving the hero before he dies. All you have to do is choose another hero, order him to approach the unconscious hero and use the "help" option to revive him.
It is also possible for a wounded party member to revive himself on his own. Before death, he performs three death saving rolls. If all of them are successful, the character will return to combat. In this case, however, the chance of a successful outcome is relatively low.
Scroll of Revivify
If the character is not revived in time, he will die. However, this is not the end of your journey. There is a special item that can bring you back to life - a Scroll of Revivify. If you use it (using it costs one action point) then the hero will come back from the dead.
Note: there may be a bug that causes a dying character to fall below the textures. This will cause it to appear outside the range of the scroll of resurrection. The only way to mend this bug is unfortunately loading the game anew.
Treat this option as a last resort, however, because you have a limited number of such scrolls. Try to keep the hero alive instead.