He was constructing his own languages and scripts in his teens, after having learned Anglo Saxon and Latin (and seeing how those fed into modern English), plus Esperanto.
He traveled all over Europe in the summers between university semesters, taking in the different landscapes, cultures, and languages.
He was a British Army Officer for World War I, leading units consisting of men from different backgrounds (class, education, trade) from his own. He devised a code system to bypass Army censors to keep his wife updated on his location and movements. And he experienced the horrors of being in the front lines of one of the most horrific wars in history.
Then after the war he became an accomplished academic, worked on the Oxford English Dictionary, specialized in Middle English and Old English translations, and translated several major works (including the definitive translation of Gawain and the Green Knight).
So by the time he started formally working on Lord of the Rings, he had built up such a rich set of experiences, skillsets, and knowledge that everything he knew was going into that world building.
No way a 25-year-old could have written Lord of the Rings. He needed 20+ years of adult experience to get to the point where he could write it.