This is one of the coolest things about fantasy writing! I get so much scope to create new words and interesting sounds. But, as I have a background in language with a limited amount of linguistics, I have a good idea about how languages work. I hope that lets me avoid the many pitfalls of creating fantasy words and names—such as the infestation of apostrophes in the middle of words!
I used to use a site called Dialect Creator to help with this. It allows you to select a series of possible syllables, as well as the length of words generated, and whether consonants are randomly inserted in the middle of words for variety. This allows me to have creative freedom, within a specific set of lexical rules.
I’m still learning, and my “languages” are by no means actual languages. I haven’t done a Tolkien with grammar and all that. Frankly, I’m not skilled enough to do that. However, the generator allows me to generate thousands of words, some of which get used as character names.
I now use the language generation tool Vulgar to help me. It’s a company generator that provides a lot more in-depth generation than Dialect Creator. I fully recommend buying the full version because it gives you more flexibility. Be warned with this in general though! Some of it is very complex – but for anyone not familiar with language in this way, there’s still the long list of generated words at the end.