I don't think he invented them so much as he came up with the realization that became 'definitive'.
Yeah, very little he wrote about was a complete invention. Ents, maybe, but then there were dryads and various woodland spirits in different mythologies since forever, so possibly not even them.
It's a bit like the way the classic red-suited Santa Claus was created in late C19 America (not by Coca-Cola, contrary to popular myth, though they certainly popularised him) out of an amalgamation of the British Father Christmas, Dutch Sinterklaas and Scandinavian Tomte.
What Tolkien did was to redefine creatures like elves that would have been familiar in some form or another to his readers as well as resurrect (in modified form) creatures like orcs that had been forgotten for centuries. I mean orcs ('orcneas') are mentioned in
Beowulf as a sort of ghoul or zombie but would have been completely unknown to anyone other than a few dusty old scholars if Tolkien hadn't recycled them in the way he did. And hobbits are an amalgamation of brownies, pixies, 'the wee folk' generally.