I have an animation of attacking and taking damage, but my unit can have a target and at the same time it will be hit by another target, is it possible to combine animations?

Related Discussions
...

Yes, it is possible to combine animations in Spine. You can achieve this by using multiple animation tracks. For example, you can play the "attack" animation on one track and the "take damage" animation on another track. The animations on higher tracks will override those on lower tracks for the same bones. This allows you to blend animations such as attacking and taking damage simultaneously. You can preview how these animations will blend using the Preview view in the Spine editor.

В Unreal Engine 5 такое возможно?

Yes, of course. It is core Spine functionality. Have a look at the docs:
https://esotericsoftware.com/spine-ue#Setting-Animations

When you use the Set and Add Animation nodes, you can specify a track. Animations across all tracks are mixed. Keys in Animations on higher tracks will overwrite keys in animations in lower tracks, so you will have to design your skeletons and animations accordingly.