Vibes, in general.

I typically get the face narrowed down before looking up names for them, although sometimes the reverse happens. I'll first think up their heritage, where they grew up, ethnicity and all, to influence the type of name they'll have. Then I'll pull up websites that list names based in a specific country of origin.
If it's a common name, I'll tweak the spelling so it's more unique, for example, Ian became Ean.

But it all traces back to what my eyes stick to the longest and then I'll find a way to fashion it.
Another fun way is with tradition. The more recent surnames I chose came from The Sims series, mostly Sims 2. Goths, Curious, Menon, Grunt, Dreamer all came from there. The Dreamers typically are African descent, but their partners aren't always of African descent, and in the game, their first name starts with the letter D. Goths are a wealthy family, so my character Thor comes from old money, but he became the sole Goth member after his parents died in the Wizarding War, but he's continuing the legacy now with his husband and extending family.
Other surnames, I came up with as a child like Forsfelle, a combination of "Forest" and "Fellow". 12 year old me had it spelled as "Forsfell" but on SS I added the 'e' to make it look a bit more fancy. Because of "Forest" I associate the name with the color green, therefore, Slytherin fits them. Their family has a tradition to have Slytherin or Ravenclaw-adjacent children born, but their partners can be in any other house.
I'm usually a stickler for keeping or creating new traditions with families. Keeps things a bit lively for me, working out how to keep a legacy going through them.