The reason why Gandalf left the ring with Bilbo and then Frodo for so many years is because he wasn’t really sure what it was. Yet, when Bilbo acted weird, he became suspicious, so he ended up travelling all the way to Minas Tirith to read about rings.
This is the place where Isildur ruled at one point, so it makes sense that knowledge of the ring resided there.
Note that it’s roughly 1000 miles from Minas Tirith to the Shire, so that’s a heck of a trip to visit the library!
Found this here, but am not sure who the author is.
It’s by Matthew Stewart
Thanks! I did a reverse image search, but didn’t find that.