Mike Shea aka Sly Flourish has an article just published on his blog called “The Most Valuable DM Tool: A Good List of Names“. I’ve embedded his YouTube video discussing this below as well.
The blog post and video contain links to some random generators that you can use to create random lists of names.
What Mike forgot to name is a couple of his own resources that also have lists of names you can use. The first is page 10 of his The Lazy DM’s Workbook that has fantasy first and last names. Followed by the very useful D&D 5e Campaign Worksheet that Mike created.
The worksheet is a nice thing to have to hand during a session anyway. But it’s random names section is very useful. I’ve used it during prep for a session to name NPCs, and during play to name an NPC on the fly.
Another source that Mike didn’t suggest, and it’s most likely because the book is no longer in print, not available digitally, and copies go for that stupid money now on sites like eBay, is Gary Gygax’s Extraordinary Book of Names. Just to get a digital copy involves looking on the shadier side of the internet.
I like the official book sources (Players Guide and Xanathar) plus the Gygax book. They are great for species related names. But I find they are best suited when planning or a session zero where time is less than an issue.
But for on the fly use during a session a list of names on a sheet of paper is in my limited experience the better option. No hunting around, reaching for a book etc. It’s just a quick look at a sheet of paper and marking off the name as used. So much quicker.