I could just say correlation != causation and move on.
...but I thought I would at least give it 5 minutes of googling.
Here's the first randomized controlled trial I could find testing whether access to libraries had any impact on literacy. TLDR (for this one study): access to libraries does not improve literacy.
"We conduct a randomized controlled trial of an Indian school library program. Overall, the program had no impact on students' scores on a language skills test administered after 16 months. The estimates are sufficiently precise to rule out effects larger than 0.053 and 0.037 standard deviations, based on the 95 and 90 percent confidence intervals. This finding is robust across individual competencies and subsets of the sample. The method of treatment, however, does seem to matter--physical libraries have no effect, while visiting librarians actually reduce test scores."
I will repeat the last line "visiting librarians actually reduce test scores." That seems counter intuitive. Maybe we should write articles w/ titles "LIBRARIES INCREASE ILLITERACY." That would be a dump article to write, but only slightly more dumb than the current article ;)
https://www.nber.org/papers/w18183
p.s. I like libraries.