Good characters are ones who have relatable flaws and motivations for their goals. It works for all characters you want to go in depth with. And good stories aren't absolutely black and white.
Nobody is greedy for greed's sake. People are often greedy our of fear for an unknown future, or needing the social validation of being wealthy. Scrooge in Christmas Charol was greedy because of fear of death. In a time where the wealthy live longer than the poor, and no socialized healthcare like the UK currently has, amassing as much wealth as one can IS insuring their health. I mean the ghost of Christmas future WAS about him fearing death, but framed in a two part way. Him coming to terms with the fact he's gunna die, and him wanting to be known as a good guy after it.
Just some ego-maniacal villain bent on wealth or conquest is boring. What's the motivation? Usually some kind of character flaw that should be atleast picked up on. Straight up, A lot of villains just give off a small dick vibe and wealth/power/conquest is a way to compensate. It's far more interesting to get their mindset. A villain would be far more interesting if they use 'technically correct' logic to serve as reason for their villainy. Like a 'demon king' looking to conquer the world in a gambit for absolute peace is far more interesting than just because it's a thing they 'should' do as the strongest.
Or often times heroes who fight for the 'status quo' which isn't necessarily a good thing either. A naive hero who 'thinks' the current system is right, and fights for it, but has to deal with learning the war he's in is just a fight over the greed/prejudice of two different countries, is far more compelling than, the hero always starts off on the side of 'good', beats the bad guy, and the story is done. Like, the Hyrulians in Zelda games are dicks to the Gerudo people, forcing them to live in the desert. Ganon usually gets his forces easy, because his people WANT to live a better life, and the Hyrulians refuse to help in any way. But the player doesn't know that kind of thing unless they REALLY look hard at it in a few select games in the series. Wisdom triforce indeed...