This is very likely Jorge Luis Borges' short story "The Library of Babel". In it, he describes a universe consisting of connected hexagonal rooms, each containing four walls with bookshelves.
While there's no definite proof, this vast library seems to contain all possible 410-page books possible with all combinations of 22 letters, a comma, a period, and a space.
The story was written in Spanish (as Borges was Argentinian) and was part of his 1941 collection El Jardín de senderos que se bifurcan (The Garden of Forking Paths), which was later expanded upon (the collection, not the story) and renamed Ficciones (Fictions).
The books are restricted to a certain format:
There are five shelves for each of the hexagon's walls; each shelf contains
thirty-five books of uniform format; each book is of four hundred and ten pages;
each page, of forty lines, each line, of some eighty letters which are black in
color. There are also letters on the spine of each book; these letters do not
indicate or prefigure what the pages will say.
They had indeed had every single combination of letters available meaning that every story possible was available.
This thinker observed that all the books, no matter how diverse they might be, are made up of the same elements: the space, the period, the comma, the twenty-two letters of the alphabet. He also alleged a fact which travelers have confirmed: In the vast Library there are no two identical books. From these two incontrovertible premises he deduced that the Library is total and that its shelves register all the possible combinations of the twenty-odd orthographical symbols [...]
There is a group of fanatics that hunt the library for the future.
There are official searchers, inquisitors. I have seen them in the performance of their function: they always arrive extremely tired from their journeys; [...]
Others destroy books they deem nonsense.
Others, inversely, believed that it was fundamental to eliminate useless works. They invaded the hexagons, showed credentials which were not always false, leafed through a volume with displeasure and condemned whole shelves: their hygienic, ascetic furor caused the senseless perdition of millions of books.
You can read it on the Internet Archive.