I go with a concept first and build to the concept. Sometimes the race comes first, other times the class fits first.
Yeah, I guess this best describes my own approach.
Let's use my 1/2ling sisters for ex:
1st we have Bree Burrfoot. 1/2ling warlock, fey patron, chain pact. About 11 years old.
Bree started as an NPC quest giver when I reworked an encounter in an old module & combined it with part of a DC module involving a pseudo-dragon.
The inn where this encounter took place was run by a 1/2ling. So I just built up the details of his family.
His oldest daughter Rose had gotten herself in trouble and had been abducted. Bree was trying to help her - by recruiting some passing adventurers for a side quest - before Dad found out. She offered them an upfront reward. The catch was that they had to shine down to tiny size, venture through a series of vermin tunnels beneath the inn & retrieve said reward from her pseudo-dragon friend Scales. She'd show the the way.
I made her a low lv warlock because I wanted her to be somewhat usefull in the tunnels, but nowhere near the PCS abilities. 1 or two usefull invocations + 2 minor spells seemed just about right. And it provided a good reason for her to be friends with the psuedo-dragon. In truth I only partially built her mechanically. She was 3 mechanics & a personality....
The pcs agreed to help her.
She proved to be an amusing addition to the party. So I had her tag along with them as an added complication when they went to rescue Rose.
And then things took a really amusing turn & both 1/2lings ended up accompanying the players far longer than expected.
Several months later I had the opportunity to play in a CoS campaign. I was vaguely considering playing a warlock. I really like the 5e class & wanted to see how one actually played lv1-?
It just so happened that another player - who knew nothing of Bree, the NPC, made a character that would mesh extremely well backstory wise with where the 1/2ling sisters were in the last arc they were present for.
So I pulled Bree out & made her a full fledged PC.
Next up is Rose Burrfoot. 1/2ling barbarian. About 18 or 19.
Rose began as an NPC personality & a mcguffin. No class at all.
Rose is not an adventurer by choice. She's an adventurer because she has a low wisdom & makes bad choices wich have had horrible consequences.
She's a barbarian because I was looking for a truly bad class/archtype for a PF campaign about a year ago. And I found one! There's a frenzied archtype in PF that's at least as dangerous to self/Allies as to foes. That's PERFECT for representing lack of skill/training!
So Rose has managed to survive her early misadventures by swing a hatchet/etc wildly until monsters either die or leave her alone.
Well, that game fizzled quick. So a few months ago I made a 5e version of her.
Bree - mostly went from race to class. I built a 1/2ling concept & attached a class.
Rose - mostly went from class to race. Especially when I made the 5e version (a modified ancestral guardian path fits her perfectly). I started by making a barbarian & attached it to Rose.