The book you were checking out had a little pocket glued to the inside of the cover that held a card with the book name on it. The librarian would write your number on the card and placed it in their filing system. They would then write or stamp the due date on the pocket of the card.
https://media.istockphoto.com/photos/library-book-due-date-g...