There's many ways.
Preferrably, you'd want a name that
makes sense for your character. If you like onomastics and baby name websites, this can be a fun way to explore new names.
Before I had a good grip on what makes a "good" name, I straight up thought up of a significant word for the character, then looked it up on
Wikipedia in different languages, and chose the one that sounded the coolest for me
If you want extra consistency, you can come up with naming "rules". They can be as simple or as complex as you wanna make them. A famous example is the
Homestuck characters, whose names all relate to their themes and always have specific numbers of letters for their name and surname, depending on whether they are a human or a troll.
In my personal case, when it comes to the objectheads in my toon world, I like to give them names associated with the inventor of the "item" they are (like a radio called Medley
Marconi, or a stack of dynamite whose full name is Trinity
Nobel Toluene). Is it accurate? Do I always make it fit? No, but it's a fun way for me to learn more about the objects I make characters from.

I'm also a big fan of alliterations, but again, it's a "soft" rule and I bend it as many times as I want. Hell, my main character's name comes from a random girl years ago. It breaks any of my rules, so it's just his stage name while his "legal" one follows my conventions... more or less
So yeah, feel free to try methods and come up with self-made rules: but also remember rules are made to be bent and broken