The Hobbit is set in the same universe as The Lord of the Rings, but it may not be totally clear how the two relate in terms of The Lord of the Rings timeline. The protagonist of The Hobbit is Bilbo Baggins, who also appears in The Lord of the Rings. Since Bilbo appears much older in The Lord of the Rings than he does in The Hobbit, it’s reasonably obvious that The Hobbit is a prequel trilogy to The Lord of the Rings. But for those who don’t consume the lore of J.R.R. Tolkien, it may not be totally clear how much time elapsed between one story and the other. After all, Hobbits don’t age like humans.
https://screenrant.com/when-hobbit-set-middle-earth-timeline/