Currently I am trying to craft a fantasy story, but I am having trouble creating a realistic backstory that can explain character actions well. How can I fix that?
Backstory does not need to be either engaging or relevant. If it were both, it would be "story." Unless you have particular need to detail someone's backstory, don't. There are numerous examples of heroes, villains, and bystanders in literature who don't have a lick of precedent for why they are acting as they are.
Your problem is your characters have no readily identifiable motivation. That makes them less than human and impossible for an audience to relate to.
Note that motivation is not necessarily the same as "backstory". People are different, and react differently to the same circumstances.
You need to understand your characters better, otherwise manufacturing a history will highlight your lack of understanding rather than justifying motivation.
JK Rowling is great in backstories. You check out hers to get an idea.
Once Upon A Time created a Rumpelstiltskin backstory; check it out too.
Me, I'm particularly gossipy and nosy. During that course of my everyday life when I hear one-line rumors, I arrive to conclusions that the person might be like this, like that. On news, when a headline was read, you'd jump to conclusions on the possible reasons why it happened.
I think that pretty well starts a good backstory. You think of a simple reason why the person turned to that type of him. Then, since it's fantasy, you'd do well in incorporating twists.
You need a clear sense of who your characters are. Their likes, passion, mannerisms, principles. With that, you could bind their backstory to the present story.