Observation of others, of life around me, often spurs the beginnings of an idea. Sometimes a character trait I find interesting in real people will combine with a theme I've been interested in (betrayal, falling out of love, whatever), and a mood I get from music, or from looking at art/ out at nature/ striking photography- and my mind concocts this Frankenstein of a character out of these jumbled elements. Then I just want to follow this person around, poke at them and see what they're up to. Delve deeper and discover more, too, because I have to flesh them out from these fragmented beginnings.
Also sometimes I just get an interesting idea for a situation and I try to think of who I could stick in that situation to kind of maximize its potential. Like, whose character flaws, strengths and quirks would make this situation even more complicated and compelling? If the situation requires something specific of a character, of course I'm going to fish around for a character who either can't or won't give it, or wants something else entirely and keeps trying to get what they want rather than what's required of them. Just like if the character comes first and they want something strongly, I'll tailor the situation so they'll have to fight to get it.
That's actually often how I worldbuild too. I try to build cultures around characters that will present them with some difficulty, without of course creating a world designed merely to prosecute my protagonist/s

Being a fantasy author gives me lots of room to create worlds that have complicated layers of oppression, opportunity, social role expectations, traditions and trailblazers alike. I mean, writing about the real world would let me work with those things too, only then I couldn't decide what these factors were- I'd just have to keep already-existing ones in mind, which isn't as fun for me.